Skip to content

CUDA: Fix checking working architectures with specifiers

We don't distinguish real/virtual architectures during compiler detection. If the user passes -DCMAKE_CUDA_ARCHITECTURES="70-virtual" we'll test with only the real architecture. If it works "architectures" will end up as "70". We check equality using strings, so this fails and we incorrectly throw an error. Fix this by comparing against CMAKE_CUDA_ARCHITECTURES with the specifiers stripped.

We need to deduplicate tested_architectures for the same reason in case the user specified something like "70-real;70-virtual".

Backport: release

Edited by Brad King

Merge request reports