summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-06-02 17:34:28 +0800
committerOpportunityLiu <[email protected]>2019-06-02 17:34:28 +0800
commit117f22a385f0118eac2aa6ef8fedf4b29062e973 (patch)
tree2782ee1cedad5c9dd4a25fa886f5fd49c883962f
parent243217c3c504e6038dce8899ad30dd7ea432499b (diff)
rename to add_cugencodes
-rw-r--r--tests/projects/cuda/console/xmake.lua6
-rw-r--r--xmake/includes/add_cugencodes.lua (renamed from xmake/includes/add_cugencode.lua)12
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/projects/cuda/console/xmake.lua b/tests/projects/cuda/console/xmake.lua
index cf39aeae4..430ad7b6d 100644
--- a/tests/projects/cuda/console/xmake.lua
+++ b/tests/projects/cuda/console/xmake.lua
@@ -1,5 +1,5 @@
-includes('add_cugencode.lua')
+includes('add_cugencodes.lua')
-- define target
target("cuda_console")
@@ -14,9 +14,9 @@ target("cuda_console")
add_files("src/*.cu")
-- generate SASS code for each SM architecture
- add_cugencode("sm_30", "sm_35", "sm_37", "sm_50", "sm_52", "sm_60", "sm_61", "sm_70")
+ 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
- add_cugencode("compute_70")
+ add_cugencodes("compute_70")
diff --git a/xmake/includes/add_cugencode.lua b/xmake/includes/add_cugencodes.lua
index c4ccfe96b..574c7bcb9 100644
--- a/xmake/includes/add_cugencode.lua
+++ b/xmake/includes/add_cugencodes.lua
@@ -15,7 +15,7 @@
-- Copyright (C) 2015 - 2019, TBOOX Open Source Group.
--
-- @author OpportunityLiu
--- @file add_cugencode.lua
+-- @file add_cugencodes.lua
--
-- add cuda `-gencode` flags to target
@@ -32,16 +32,16 @@
-- @seealso xmake/modules/lib/detect/find_cudadevices
--
-- e.g.
--- includes("add_cugencode.lua")
+-- includes("add_cugencodes.lua")
-- target("test")
-- set_kind("binary")
-- add_files("src/*.cu")
--- add_cugencode("native", "compute_50,sm_50", "compute_70")
+-- add_cugencodes("native", "compute_50,sm_50", "compute_70")
--
-- define rule
-rule("cuda.add_gencode")
+rule("cuda.add_gencodes")
before_load(function (target)
local function set (list)
@@ -140,9 +140,9 @@ rule("cuda.add_gencode")
rule_end()
-- add cuda gencode to target
-function add_cugencode(...)
+function add_cugencodes(...)
-- apply rule
- add_rules("cuda.add_gencode")
+ add_rules("cuda.add_gencodes")
add_values("cuda.gencode", ...)
end