diff options
| author | OpportunityLiu <[email protected]> | 2019-06-02 14:00:34 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-02 14:00:34 +0800 |
| commit | f60e817f82e10716511e435707f3750ebf98ca23 (patch) | |
| tree | 0f00461e26c6a62cbabc7b55ee7232e690a11df9 /tests/projects/cuda/console/xmake.lua | |
| parent | 78f4fa1228d508f4aceecfe03fd233478f56da54 (diff) | |
add add_cugencode and find_cudadevices
Diffstat (limited to 'tests/projects/cuda/console/xmake.lua')
| -rw-r--r-- | tests/projects/cuda/console/xmake.lua | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/projects/cuda/console/xmake.lua b/tests/projects/cuda/console/xmake.lua index b50beb03c..cf39aeae4 100644 --- a/tests/projects/cuda/console/xmake.lua +++ b/tests/projects/cuda/console/xmake.lua @@ -1,3 +1,6 @@ + +includes('add_cugencode.lua') + -- define target target("cuda_console") @@ -11,14 +14,9 @@ target("cuda_console") add_files("src/*.cu") -- generate SASS code for each SM architecture - for _, sm in ipairs({"30", "35", "37", "50", "52", "60", "61", "70"}) do - add_cuflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm) - add_ldflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm) - end + add_cugencode("sm_30", "sm_35", "sm_37", "sm_50", "sm_52", "sm_60", "sm_61", "sm_70") -- generate PTX code from the highest SM architecture to guarantee forward-compatibility - sm = "70" - add_cuflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm) - add_ldflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm) - + add_cugencode("compute_70") + |
