Skip to content

CUDA: Defer architecture testing to the compiler testing step

Brad King requested to merge brad.king/cmake:cuda-arch-verify into master

Verifying the architectures during compiler identification is redundant, and requires a lot more up-front information than we should need. It also causes unsupported architectures to break the compiler id and version detection, so the resulting output from CMake does not report the compiler version, which is useful information to know why the specified architectures are not supported.

The "detecting compiler ABI info" and "check for working compiler" steps already pass CMAKE_CUDA_ARCHITECTURES into their test projects. Therefore we can just drop the earlier architecture testing. Bad architectures will be reported as a not-working compiler, and the output will include the compiler's error message.

This reverts the approach from:

Their goal was in part to avoid waiting until the test for working compiler to detect unsupported architectures. However, experience has shown that failing earlier is more trouble than it's worth.

Fixes: #23161 (closed)
Issue: #20756 (closed)

Merge request reports

Loading