summaryrefslogtreecommitdiffstats
path: root/xmrstak
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-04-04 21:02:18 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2018-06-04 21:07:11 +0000
commita91df76170f72dd9d391b2e2ed0c5f8f6ffba61e (patch)
tree2769110efa18db7e883b9a7aa0ac8ce7aca04bcf /xmrstak
parent0744ae433e211fbd6b6251f0f424ed2faf68e23f (diff)
downloadxmr-stak-a91df76170f72dd9d391b2e2ed0c5f8f6ffba61e.zip
xmr-stak-a91df76170f72dd9d391b2e2ed0c5f8f6ffba61e.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.
Diffstat (limited to 'xmrstak')
-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