From c3b687c0a0843debd71a84d09437b419b178a0c2 Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Wed, 4 Apr 2018 21:02:18 +0200 Subject: fix cuda architecture detection fix #1297 If sm_20 is mixed with other architectures the detection for the minimal supported architecture is broken. --- xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmrstak/backend/nvidia/nvcc_code') diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu index e2f0b2d..02c157e 100644 --- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu +++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu @@ -483,7 +483,7 @@ extern "C" int cuda_get_deviceinfo(nvid_ctx* ctx) * with a sm_20 only compiled binary */ for(int i = 0; i < arch.size(); ++i) - if(minSupportedArch == 0 || (arch[i] >= 30 && arch[i] < minSupportedArch)) + if(arch[i] >= 30 && (minSupportedArch == 0 || arch[i] < minSupportedArch)) minSupportedArch = arch[i]; if(minSupportedArch < 30 || gpuArch < minSupportedArch) { -- cgit v1.1