CUDA: Support a "native" option for CUDA_ARCHITECTURES
At the moment, if you want to build a CUDA application target your own system's GPU, you need to either manually specify the architecture, e.g.
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70)
or use the CUDA_SELECT_NVCC_ARCH_FLAGS
mechanism (see also this issue).
That is too cumbersome. I don't see any reason why the following shouldn't work:
set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES auto)
which would just perform the equivalent of CUDA_SELECT_NVCC_ARCH_FLAGS
behind the scenes (with caching of course).
Bikeshedding: Capitalization (auto
? Auto
? AUTO
)? Use of system
or system-devices
or system-gpus
or available-gpus
?
Edited by Brad King