Fix CMake CUDA support for pylibraft when raft is found. #1659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR always enables CUDA language support in pylibraft's CMakeLists.txt, to work around an issue I encountered while building.
I am trying to build pylibraft in rapids-compose and saw an error in the CMake support for enabling CUDA.
This error indicates that
rapids_cuda_init_architectures(pylibraft)
isn't being called, which handles some preprocessing for this architectures variable so that CMake recognizes the results.It seems like the error shown below comes from this part of libraft's CMakeLists.txt where the CUDA language is being enabled without having first called
rapids_cuda_init_architectures
.Currently,
rapids_cuda_init_architectures
is called and the CUDA language is only enabled in pylibraft whenraft_FOUND
is false. However, I'm building in an environment where raft can be found. It seems like we always need to enable CUDA support due to a requirement in libraft itself, based on the code I see in cuML and cuGraph. Therefore, I copied a similar change into pylibraft in this PR, and it appears to work.