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

WIP: Revamp CUDA support #585

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

white238
Copy link
Member

@white238 white238 commented Jun 17, 2022

This removes the old deprecated FindCUDA and mimic's what @davidbeckingsale did for HIP support.

Breaking changes:

  • cuda -> blt::cuda
  • cuda_runtime -> blt::cuda_runtime
  • CMAKE_LINK_WITH_NVCC -> BLT_CMAKE_LINK_WITH_NVCC (warning about former being deprecated)
  • Removes Clang CUDA support (does anyone still use this @davidbeckingsale ?)

Thanks to @kennyweiss for sitting on a webex while I drastically rip support out from under myself!

option(BLT_CUDA_LINK_WITH_NVCC "Enable linking with NVCC" OFF)
if (DEFINED CUDA_LINK_WITH_NVCC)
message(WARNING "CUDA_LINK_WITH_NVCC is deprecated and will eventually be removed.")
set(BLT_CUDA_LINK_WITH_NVCC ${CUDA_LINK_WITH_NVCC})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be CACHE FORCE?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that too as I did it =) I'll test it out

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworked it to just populate the option()..

@rhornung67
Copy link
Member

@white238 will this require a syntax change for BLT users like the recent change in HIP support; e.g., 'cuda_runtime' --> 'cuda::runtime'?

@white238
Copy link
Member Author

@white238 will this require a syntax change for BLT users like the recent change in HIP support; e.g., 'cuda_runtime' --> 'cuda::runtime'?

Yes this is a breaking change in the following ways:

cuda -> blt::cuda
cuda_runtime -> blt::cuda_runtime
CMAKE_LINK_WITH_NVCC -> BLT_CMAKE_LINK_WITH_NVCC

@white238 white238 force-pushed the feature/white238/cuda_revamp branch from 2ef7009 to b178da6 Compare June 18, 2022 03:49
@white238
Copy link
Member Author

We should probably add this to the blt::cuda target:

https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#cuda-driver-library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants