summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-04-04 21:02:18 +0200
committerpsychocrypt <psychocryptHPC@gmail.com>2018-04-04 21:02:18 +0200
commitc3b687c0a0843debd71a84d09437b419b178a0c2 (patch)
treefc7151e78116c6318bdbfc24c7103d3b050313f4
parent5ce9892bebaa3038d3282d247ffee99af8b20ae8 (diff)
downloadxmr-stak-c3b687c0a0843debd71a84d09437b419b178a0c2.zip
xmr-stak-c3b687c0a0843debd71a84d09437b419b178a0c2.tar.gz
fix cuda architecture detection
fix #1297 If sm_20 is mixed with other architectures the detection for the minimal supported architecture is broken.
-rw-r--r--xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu2
1 files changed, 1 insertions, 1 deletions
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)
{
OpenPOWER on IntegriCloud