summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoildkv <[email protected]>2022-02-25 13:50:30 +0800
committerGitHub <[email protected]>2022-02-25 13:50:30 +0800
commit949795859315dbe358e3340967e35b09811fcbb8 (patch)
treeaabeea60ed9c1f9dcf0af6c456b84194d91d4db8
parent7282a7c84fc1543680f132b4e5e8840ce1cb28fd (diff)
fix find_cudadevice on windows x86
-rw-r--r--xmake/modules/lib/detect/find_cudadevices.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/lib/detect/find_cudadevices.lua b/xmake/modules/lib/detect/find_cudadevices.lua
index dcf4a4229..fac3c8a21 100644
--- a/xmake/modules/lib/detect/find_cudadevices.lua
+++ b/xmake/modules/lib/detect/find_cudadevices.lua
@@ -131,6 +131,11 @@ function _find_devices(verbose, envs)
{
function ()
local args = { sourcefile, "-run", "-o", outfile , '-DPRINT_SUFFIX="' .. _PRINT_SUFFIX .. '"' }
+ if is_arch("x86") then
+ table.insert(args, "-m32")
+ elseif is_arch("x64") then
+ table.insert(args, "-m64")
+ end
return os.iorunv(nvcc.program, args, {envs = envs})
end,
catch