Skip to content

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

@victorapm
Copy link

Hi Chris, I'm having issues compiling hypre+umpire in shared mode. It seems this PR solves the issue

cannot find -lcuda_runtime: No such file or directory
  >> 1199    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

@white238
Copy link
Member Author

white238 commented Oct 6, 2025

Hi Chris, I'm having issues compiling hypre+umpire in shared mode. It seems this PR solves the issue

cannot find -lcuda_runtime: No such file or directory
  >> 1199    clang++: error: linker command failed with exit code 1 (use -v to see invocation)

That's great to know. I was hoping to have time to revive this PR very soon. (honestly was hoping last year, it pains me how long this sat). The blueos machines were just retired and it makes it a good time to revamp the CUDA support w/o having to support that machine.

I'll bump it up my list. Hopefully its just fixing conflicts and testing it on a few codes.

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.

4 participants