cuda_select_nvcc_arch_flags includes unsupported and deprecated "compute capabilities"
I'm using CUDA 11.1 (also tried 11.2). In this version, "Compute Capability" 3.0 is not supported, and CC's 3.5, 3.7, 5.0, 5.2 are deprecated and their use triggers a warning.
Yet, when I run
cuda_select_nvcc_arch_flags(FOO Auto)
message("${FOO}")
I get:
-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_70,code=compute_70;-gencode;arch=compute_75,code=compute_75
which includes the no-longer-supported and the deprecated compute capabilities.
I tried this both with distribution's default CMake version 3.13.4, and with CMake 3.19.4 which I built from sources (and installed under /opt/cmake).
I would say this is a bug. I would also like it fixed in older branches so that people with older CMake versions (like my distribution's default) can enjoy the fix and don't have to manually edit the results of cuda_select_nvcc_arch_flags()
.
Edited by Eyal Rozenberg