Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix auto-detecting GPU architectures #727

Conversation

trxcllnt
Copy link
Contributor

Fixes regression from #726 in auto-detecting GPU architectures when -DCMAKE_CUDA_ARCHITECTURES= is passed on the CLI.

Now that the cached CMAKE_CUDA_ARCHITECTURES isn't unset before calling enable_language(CUDA), this call throws an error and configuration fails. This change ensures we call enable_language(CUDA) after any potential rewrites of CMAKE_CUDA_ARCHITECTURES.

@trxcllnt trxcllnt requested a review from a team as a code owner March 13, 2021 16:36
@github-actions github-actions bot added the CMake label Mar 13, 2021
@kkraus14 kkraus14 added bug Something isn't working non-breaking Non-breaking change labels Mar 13, 2021
@kkraus14
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit cb81c80 into rapidsai:branch-0.19 Mar 14, 2021
rapids-bot bot pushed a commit that referenced this pull request Mar 15, 2021
Follow up to #727 after discussing with @robertmaynard it was decided that setting `CMAKE_CUDA_ARCHITECTURES` to `OFF` instead of undefined is better.

Authors:
  - Paul Taylor (@trxcllnt)

Approvers:
  - Keith Kraus (@kkraus14)

URL: #729
rapids-bot bot pushed a commit to rapidsai/cudf that referenced this pull request Mar 15, 2021
Fixes regression from #7579 in auto-detecting GPU architectures when `-DCMAKE_CUDA_ARCHITECTURES=` is passed on the CLI.

Now that the cached `CMAKE_CUDA_ARCHITECTURES` isn't unset before calling `enable_language(CUDA)`, this call throws an error and configuration fails. This change ensures we call `enable_language(CUDA)` after any potential rewrites of `CMAKE_CUDA_ARCHITECTURES`.

This PR also aligns with RMM's `EvalGPUArchs.cmake` logic and prints `SUPPORTED_CUDA_ARCHITECTURES` instead of `"ALL"` in the case the current machine is a CPU-only node.

Related: rapidsai/rmm#727

Authors:
  - Paul Taylor (@trxcllnt)
  - Robert Maynard (@robertmaynard)

Approvers:
  - Keith Kraus (@kkraus14)

URL: #7593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CMake non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants