Skip to content

Commit 99c434f

Browse files
authored
Link to nvtx3::nvtx3-cpp instead of nvToolsExt (#18730)
Cherry-picking and squashing Bradley's commits: 35b78d8 & c574119 As part of CUDA 12.9 bringup, we found that cuDF is linking to the legacy `nvToolsExt` library, which is dropped in that CUDA release. However cuDF no longer uses the legacy `nvToolsExt` library since upgrading to NVTX 3. In the rest of the code, we use the `nvtx3::nvtx3-cpp` target. So this replaces the few `nvToolsExt` usages with the new/preferred target. Authors: - https://github.com/jakirkham - Bradley Dice (https://github.com/bdice) Approvers: - David Wendt (https://github.com/davidwendt) - Bradley Dice (https://github.com/bdice) URL: #18730
1 parent d52fb25 commit 99c434f

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

cpp/examples/billion_rows/CMakeLists.txt

+12-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,22 @@ add_library(groupby_results OBJECT groupby_results.cpp)
2424
target_link_libraries(groupby_results PRIVATE cudf::cudf)
2525

2626
add_executable(brc brc.cpp)
27-
target_link_libraries(brc PRIVATE cudf::cudf nvToolsExt $<TARGET_OBJECTS:groupby_results>)
27+
target_link_libraries(
28+
brc PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
29+
$<TARGET_OBJECTS:groupby_results>
30+
)
2831
install(TARGETS brc DESTINATION bin/examples/libcudf)
2932

3033
add_executable(brc_chunks brc_chunks.cpp)
31-
target_link_libraries(brc_chunks PRIVATE cudf::cudf nvToolsExt $<TARGET_OBJECTS:groupby_results>)
34+
target_link_libraries(
35+
brc_chunks PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
36+
$<TARGET_OBJECTS:groupby_results>
37+
)
3238
install(TARGETS brc_chunks DESTINATION bin/examples/libcudf)
3339

3440
add_executable(brc_pipeline brc_pipeline.cpp)
35-
target_link_libraries(brc_pipeline PRIVATE cudf::cudf nvToolsExt $<TARGET_OBJECTS:groupby_results>)
41+
target_link_libraries(
42+
brc_pipeline PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
43+
$<TARGET_OBJECTS:groupby_results>
44+
)
3645
install(TARGETS brc_pipeline DESTINATION bin/examples/libcudf)

cpp/examples/parquet_io/CMakeLists.txt

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,18 @@ target_link_libraries(parquet_io_utils PRIVATE cudf::cudf)
2424

2525
# Build and install parquet_io
2626
add_executable(parquet_io parquet_io.cpp)
27-
target_link_libraries(parquet_io PRIVATE cudf::cudf nvToolsExt $<TARGET_OBJECTS:parquet_io_utils>)
27+
target_link_libraries(
28+
parquet_io PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
29+
$<TARGET_OBJECTS:parquet_io_utils>
30+
)
2831
target_compile_features(parquet_io PRIVATE cxx_std_17)
2932
install(TARGETS parquet_io DESTINATION bin/examples/libcudf)
3033

3134
# Build and install parquet_io_multithreaded
3235
add_executable(parquet_io_multithreaded parquet_io_multithreaded.cpp)
3336
target_link_libraries(
34-
parquet_io_multithreaded PRIVATE cudf::cudf nvToolsExt $<TARGET_OBJECTS:parquet_io_utils>
37+
parquet_io_multithreaded PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
38+
$<TARGET_OBJECTS:parquet_io_utils>
3539
)
3640
target_compile_features(parquet_io_multithreaded PRIVATE cxx_std_17)
3741
install(TARGETS parquet_io_multithreaded DESTINATION bin/examples/libcudf)

cpp/examples/strings/CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,27 @@ list(APPEND CUDF_CUDA_FLAGS --expt-extended-lambda --expt-relaxed-constexpr)
2222

2323
add_executable(libcudf_apis libcudf_apis.cpp)
2424
target_compile_features(libcudf_apis PRIVATE cxx_std_17)
25-
target_link_libraries(libcudf_apis PRIVATE cudf::cudf nvToolsExt)
25+
target_link_libraries(libcudf_apis PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>)
2626
install(TARGETS libcudf_apis DESTINATION bin/examples/libcudf)
2727

2828
add_executable(custom_with_malloc custom_with_malloc.cu)
2929
target_compile_features(custom_with_malloc PRIVATE cxx_std_17)
3030
target_compile_options(custom_with_malloc PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:${CUDF_CUDA_FLAGS}>")
31-
target_link_libraries(custom_with_malloc PRIVATE cudf::cudf nvToolsExt)
31+
target_link_libraries(
32+
custom_with_malloc PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>
33+
)
3234
install(TARGETS custom_with_malloc DESTINATION bin/examples/libcudf)
3335

3436
add_executable(custom_prealloc custom_prealloc.cu)
3537
target_compile_features(custom_prealloc PRIVATE cxx_std_17)
3638
target_compile_options(custom_prealloc PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:${CUDF_CUDA_FLAGS}>")
37-
target_link_libraries(custom_prealloc PRIVATE cudf::cudf nvToolsExt)
39+
target_link_libraries(custom_prealloc PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>)
3840
install(TARGETS custom_prealloc DESTINATION bin/examples/libcudf)
3941

4042
add_executable(custom_optimized custom_optimized.cu)
4143
target_compile_features(custom_optimized PRIVATE cxx_std_17)
4244
target_compile_options(custom_optimized PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:${CUDF_CUDA_FLAGS}>")
43-
target_link_libraries(custom_optimized PRIVATE cudf::cudf nvToolsExt)
45+
target_link_libraries(custom_optimized PRIVATE cudf::cudf $<BUILD_LOCAL_INTERFACE:nvtx3::nvtx3-cpp>)
4446
install(TARGETS custom_optimized DESTINATION bin/examples/libcudf)
4547

4648
install(FILES ${CMAKE_CURRENT_LIST_DIR}/names.csv DESTINATION bin/examples/libcudf)

0 commit comments

Comments
 (0)