Closed liusida closed 4 years ago
In CMake, CUDA_SELECT_NVCC_ARCH_FLAGS(ARCH_FLAGS)
can do the detection.
How ever, on DeepGreen, one needs to compile with at least one GPU allocated. otherwise, the detection will fail. Because this function is basically calling CUDA's function cudaGetDeviceCount
and cudaGetDeviceProperties
to get the architecture version.
so if you saw:
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;7.0;7.0+PTX;7.5;7.5+PTX
while doing cmake ..
, please allocate some GPU first.
Can this be done automatically? It is not neat to change this every time when I clone a new repo.