diff options
| author | OpportunityLiu <[email protected]> | 2019-06-02 15:12:32 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-02 15:12:32 +0800 |
| commit | 91fcda17af5b35c2c5bc8ee02a39f6d88d431626 (patch) | |
| tree | 1f466e841a2db7868b4009278c35a79a11639416 | |
| parent | f60e817f82e10716511e435707f3750ebf98ca23 (diff) | |
rename filter
| -rw-r--r-- | xmake/includes/add_cugencode.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/find_cudadevices.lua | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xmake/includes/add_cugencode.lua b/xmake/includes/add_cugencode.lua index 9bc454ed3..c4ccfe96b 100644 --- a/xmake/includes/add_cugencode.lua +++ b/xmake/includes/add_cugencode.lua @@ -63,7 +63,7 @@ rule("cuda.add_gencode") if archs == 'native' then import("lib.detect.find_cudadevices") - local device = find_cudadevices({ skip_compute_mode_prohibited = true, order_by_gflops = true })[1] + local device = find_cudadevices({ skip_compute_mode_prohibited = true, order_by_flops = true })[1] if device then return nf_cugencode('sm_' .. device.major .. device.minor) end diff --git a/xmake/modules/lib/detect/find_cudadevices.lua b/xmake/modules/lib/detect/find_cudadevices.lua index c7d250557..683831add 100644 --- a/xmake/modules/lib/detect/find_cudadevices.lua +++ b/xmake/modules/lib/detect/find_cudadevices.lua @@ -209,7 +209,7 @@ function _min_sm_arch(devices, min_sm_arch) return results end -function _order_by_gflops(devices) +function _order_by_flops(devices) local nGpuArchCoresPerSM = { [30] = 192 , [32] = 192 @@ -243,7 +243,7 @@ end -- find cuda devices on the host -- -- @param opt the options --- e.g. { verbose = false, force = false, cachekey = "xxxx", min_sm_arch = 35, skip_compute_mode_prohibited = false, order_by_gflops = true } +-- e.g. { verbose = false, force = false, cachekey = "xxxx", min_sm_arch = 35, skip_compute_mode_prohibited = false, order_by_flops = true } -- -- @return { { ['$id'] = 0, name = "GeForce GTX 960M", major = 5, minor = 0, ... }, ... } -- for all keys, see https://docs.nvidia.com/cuda/cuda-runtime-api/structcudaDeviceProp.html#structcudaDeviceProp @@ -263,8 +263,8 @@ function main(opt) if opt.skip_compute_mode_prohibited then devices = _skip_compute_mode_prohibited(devices) end - if opt.order_by_gflops then - devices = _order_by_gflops(devices) + if opt.order_by_flops then + devices = _order_by_flops(devices) end return devices |
