You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake_minimum_required(VERSION)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 75)
endif()
project(example LANGUAGES CUDA)
to our CMakeLists.txt.
That way if we are on a system that has nvcc but doesn't have a GPU, there is a fallback on which CUDA arch to build. I ran into this issue when building on conda-forge since they have nvcc in their pipeline but no GPU, so then the arch doesn't get set and the build fails.
I'll have to test this in a VM later, but let me know if you think this is unnecessary or handled in a better way.
The text was updated successfully, but these errors were encountered:
grumble I'm not sure what conda-forge is doing then with their cuda/nvcc setup since if I don't set the cuda arch I get CUDA_ARCHITECTURES is empty for target "cmTC_60975" so it must be a configuration issue then, thanks!
I think we need to add something like this:
to our
CMakeLists.txt
.That way if we are on a system that has
nvcc
but doesn't have a GPU, there is a fallback on which CUDA arch to build. I ran into this issue when building on conda-forge since they havenvcc
in their pipeline but no GPU, so then the arch doesn't get set and the build fails.I'll have to test this in a VM later, but let me know if you think this is unnecessary or handled in a better way.
The text was updated successfully, but these errors were encountered: