From 0722a44d0c64f78b019c7f439ed240e7d7bf3f96 Mon Sep 17 00:00:00 2001 From: Hoildkv <42310255+xq114@users.noreply.github.com> Date: Fri, 25 Feb 2022 20:24:35 +0800 Subject: add plat/arch info to find_cudadevices --- xmake/rules/cuda/gencodes/xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/rules/cuda/gencodes/xmake.lua b/xmake/rules/cuda/gencodes/xmake.lua index f4f51c06d..f60f8cd2e 100644 --- a/xmake/rules/cuda/gencodes/xmake.lua +++ b/xmake/rules/cuda/gencodes/xmake.lua @@ -59,7 +59,7 @@ rule("cuda.gencodes") break end end - local device = find_cudadevices({skip_compute_mode_prohibited = true, order_by_flops = true, envs = cuda_envs})[1] + local device = find_cudadevices({skip_compute_mode_prohibited = true, order_by_flops = true, envs = cuda_envs, plat = target:plat(), arch = target:arch()})[1] if device then return nf_cugencode("sm_" .. device.major .. device.minor) end -- cgit v1.3.1