File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1619,10 +1619,12 @@ if(USE_CUDA)
1619
1619
endif ()
1620
1620
target_link_libraries (torch_cuda INTERFACE torch::cudart )
1621
1621
target_link_libraries (torch_cuda PUBLIC c10_cuda )
1622
- if (TARGET torch::nvtx3 )
1623
- target_link_libraries (torch_cuda PRIVATE torch::nvtx3 )
1624
- else ()
1625
- target_link_libraries (torch_cuda PUBLIC torch::nvtoolsext )
1622
+ if (TARGET torch::nvtx3 ) # modern path
1623
+ target_link_libraries (torch_global_deps torch::nvtx3 )
1624
+ elseif (TARGET CUDA::nvtx3 ) # fallback for newer CUDA toolkits
1625
+ target_link_libraries (torch_global_deps CUDA::nvtx3 )
1626
+ elseif (TARGET torch::nvtoolsext ) # legacy nvtoolsext
1627
+ target_link_libraries (torch_global_deps torch::nvtoolsext )
1626
1628
endif ()
1627
1629
1628
1630
target_include_directories (
You can’t perform that action at this time.
0 commit comments