diff options
| -rw-r--r-- | xmake/modules/lib/detect/find_cudadevices.lua | 5 |
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 |
