Skip to content
Snippets Groups Projects
Commit c3b687c0 authored by psychocrypt's avatar psychocrypt
Browse files

fix cuda architecture detection

fix #1297

If sm_20 is mixed with other architectures the detection for the minimal supported architecture is broken.
parent 5ce9892b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment