-
Notifications
You must be signed in to change notification settings - Fork 24.2k
CMake: update FindCUDAToolkit.cmake, use torch::nvtx3 if present, mod… #153339
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
base: main
Are you sure you want to change the base?
Conversation
…ify torch/__init__.py to include libnvToolsExt.so if cuda < 12.9
… for older Cuda nvtoolsext
@pytorchbot label "topic: not user facing" |
cmake/Dependencies.cmake
Outdated
@@ -1018,22 +1018,24 @@ endif() | |||
|
|||
# ---[ nvtx | |||
if(USE_SYSTEM_NVTX) | |||
find_path(nvtx3_dir NAMES nvtx3 PATHS ${CUDA_INCLUDE_DIRS}) | |||
find_path(nvtx3_dir NAMES nvtx3 PATHS /usr/local/cuda/include ${CUDA_INCLUDE_DIRS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this hard coded? is there not some CMake variable for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mistaken testing artifact. Thank you for finding it.
…ed path /usr/local/cuda/include
…fied torch/__init__.py
CMake: update FindCUDAToolkit.cmake, use torch::nvtx3 if present, modify torch/init.py to include libnvToolsExt.so if cuda < 12.9
Fixes #152756
Cuda-12.9 removed libnvToolsExt.so.* and is now pure header nvtx3.
Modify torch/init.py to include libnvToolsExt.so only if cuda < 12.9
pytorch/cmake/Modules/FindCUDAToolkit.cmake is old enough to not have any reference to CUDA::nvtx3. I updated to the current version FindCUDAToolkit.cmake.