diff options
| author | OpportunityLiu <[email protected]> | 2019-07-23 12:01:45 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-23 12:01:45 +0800 |
| commit | 49f14868b5fa9bca4aa2f51ea2b70f9edae89cb6 (patch) | |
| tree | e6a9f293b32156bf6eb76042e4b99a3de8e3e895 /xmake/rules/cuda | |
| parent | 23e1f7cc177c5cc6e2fd12c627bd7d2bc86d72c2 (diff) | |
remove unused code
Diffstat (limited to 'xmake/rules/cuda')
| -rw-r--r-- | xmake/rules/cuda/gencodes/xmake.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/cuda/gencodes/xmake.lua b/xmake/rules/cuda/gencodes/xmake.lua index d1a1dc277..09e45ed72 100644 --- a/xmake/rules/cuda/gencodes/xmake.lua +++ b/xmake/rules/cuda/gencodes/xmake.lua @@ -98,7 +98,6 @@ rule("cuda.gencodes") end end - local result = { clang = {}, nvcc = {} } if v_arch == nil and #r_archs == 0 then return nil end @@ -111,15 +110,16 @@ rule("cuda.gencodes") if v_arch then table.insert(r_archs, v_arch) + else + v_arch = math.min(unpack(r_archs)) end r_archs = table.unique(r_archs) + local clang_flags = {} for _, r_arch in ipairs(r_archs) do table.insert(clang_flags, '--cuda-gpu-arch=sm_' .. r_arch) end - r_archs = table.unique(r_archs) - v_arch = v_arch or math.min(unpack(r_archs)) local nvcc_flags = nil if #r_archs == 1 then nvcc_flags = '-gencode arch=compute_' .. v_arch .. ',code=sm_' .. r_archs[1] |
