diff options
author | psychocrypt <psychocryptHPC@gmail.com> | 2018-04-04 21:02:18 +0200 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2018-06-04 21:07:11 +0000 |
commit | a91df76170f72dd9d391b2e2ed0c5f8f6ffba61e (patch) | |
tree | 2769110efa18db7e883b9a7aa0ac8ce7aca04bcf /xmrstak | |
parent | 0744ae433e211fbd6b6251f0f424ed2faf68e23f (diff) | |
download | xmr-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.cu | 2 |
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) { |