summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-02 20:07:04 +0800
committerGitHub <[email protected]>2019-06-02 20:07:04 +0800
commitadf7265401df3259ff90868cfcc9baaad66d172d (patch)
tree2782ee1cedad5c9dd4a25fa886f5fd49c883962f /tests
parent78f4fa1228d508f4aceecfe03fd233478f56da54 (diff)
parent117f22a385f0118eac2aa6ef8fedf4b29062e973 (diff)
Merge pull request #430 from OpportunityLiu/dev
支持 nvcc -gencode 选项
Diffstat (limited to 'tests')
-rw-r--r--tests/projects/cuda/console/xmake.lua14
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..430ad7b6d 100644
--- a/tests/projects/cuda/console/xmake.lua
+++ b/tests/projects/cuda/console/xmake.lua
@@ -1,3 +1,6 @@
+
+includes('add_cugencodes.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_cugencodes("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_cugencodes("compute_70")
+