diff options
| author | xq114 <[email protected]> | 2025-08-13 19:19:23 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2025-08-13 19:19:23 +0800 |
| commit | 7d808cdf1fcae9115f461295cdb27d46d01d4057 (patch) | |
| tree | f8b6036dddf02e5059507f026c7c7dea51962f9e /xmake/modules | |
| parent | 7ab1594d2578a0b31d0d09ed2ac813a8be0ee680 (diff) | |
fix find_cudadevices for CUDA 13
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/lib/detect/find_cudadevices.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/lib/detect/find_cudadevices.lua b/xmake/modules/lib/detect/find_cudadevices.lua index 2b75d725a..c780bf311 100644 --- a/xmake/modules/lib/detect/find_cudadevices.lua +++ b/xmake/modules/lib/detect/find_cudadevices.lua @@ -130,7 +130,7 @@ function _find_devices(verbose, opt) local results, errors = try { function () - local args = { sourcefile, "-run", "-o", outfile , '-DPRINT_SUFFIX="' .. _PRINT_SUFFIX .. '"' } + local args = { sourcefile, "-run", "-lcuda", "-o", outfile , '-DPRINT_SUFFIX="' .. _PRINT_SUFFIX .. '"' } if opt.arch == "x86" then table.insert(args, "-m32") elseif opt.arch == "x64" or opt.arch == "x86_64" then @@ -247,6 +247,8 @@ function _order_by_flops(devices) , [80] = 64 , [86] = 128 , [87] = 128 + , [89] = 128 + , [90] = 128 } for _, dev in ipairs(devices) do @@ -254,7 +256,7 @@ function _order_by_flops(devices) if dev.major == 9999 and dev.minor == 9999 then sm_per_multiproc = 1 else - sm_per_multiproc = ngpu_arch_cores_per_sm[dev.major * 10 + dev.minor] or 64; + sm_per_multiproc = ngpu_arch_cores_per_sm[dev.major * 10 + dev.minor] or 128; end dev["$flops"] = dev.multiProcessorCount * sm_per_multiproc * dev.clockRate end |
