Skip to content

Commit

Permalink
Disable NVBench CUPTI support by default. (#504)
Browse files Browse the repository at this point in the history
This PR disables CUPTI support in NVBench by default.

In essentially all of RAPIDS, we have to set `NVBench_ENABLE_CUPTI OFF`. By default, this is enabled, but it leads to several problems. First, when CUPTI support is enabled, the benchmark executables require the same CUDA major.minor version at runtime, meaning that (for instance) we can't build with CUDA 11.8 and expect that the benchmarks can be run with CUDA 11.5. Generally RAPIDS wants to produce builds that follow rules for CUDA minor version compatibility within a CUDA major version. Secondly, developers (especially new developers building from source) frequently run into issues where CUPTI is not available. We don't make `cuda-cupti-dev` a conda dependency in cudf, specifically because we disable CUPTI support most of the time. However, users building from source or using their own build invocations won't have CUPTI disabled, and run into problems compiling because of this missing dependency.

Examples:
- https://github.com/rapidsai/cudf/blob/d1ba966536e30dc728c09726f6ec595100bfea68/conda/recipes/libcudf/build.sh#L9
- https://github.com/rapidsai/cudf/blob/d1ba966536e30dc728c09726f6ec595100bfea68/.github/workflows/pr.yaml#L140

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Robert Maynard (https://github.com/robertmaynard)

URL: #504
  • Loading branch information
bdice authored Dec 12, 2023
1 parent 287a970 commit c99b5c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
11 changes: 9 additions & 2 deletions rapids-cmake/cpm/nvbench.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ across all RAPIDS projects.
Will build nvbench statically. No local searching for a previously
built version will occur.

.. versionchanged:: v24.02.00

NVBench_ENABLE_CUPTI is set to OFF by default.

Result Targets
^^^^^^^^^^^^^^
nvbench::nvbench target will be created
Expand Down Expand Up @@ -93,8 +97,11 @@ function(rapids_cpm_nvbench)
GIT_SHALLOW ${shallow}
PATCH_COMMAND ${patch_command}
EXCLUDE_FROM_ALL ${exclude}
OPTIONS "NVBench_ENABLE_NVML ${nvbench_with_nvml}" "NVBench_ENABLE_EXAMPLES OFF"
"NVBench_ENABLE_TESTING OFF" "NVBench_ENABLE_INSTALL_RULES ${to_install}"
OPTIONS "NVBench_ENABLE_NVML ${nvbench_with_nvml}"
"NVBench_ENABLE_CUPTI OFF"
"NVBench_ENABLE_EXAMPLES OFF"
"NVBench_ENABLE_TESTING OFF"
"NVBench_ENABLE_INSTALL_RULES ${to_install}"
"BUILD_SHARED_LIBS ${build_shared}")

include("${rapids-cmake-dir}/cpm/detail/display_patch_status.cmake")
Expand Down
1 change: 0 additions & 1 deletion testing/cpm/cpm_nvbench-conda-fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ rapids_cuda_set_architectures(RAPIDS)

# Force shared libs so that nvbench doesn't have a chance to use a static fmt
set(BUILD_SHARED_LIBS ON)
set(NVBench_ENABLE_CUPTI OFF)
rapids_cpm_init()
rapids_cpm_rmm()
rapids_cpm_nvbench()
Expand Down
1 change: 0 additions & 1 deletion testing/cpm/cpm_nvbench-conda.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ set(ENV{CONDA_BUILD} "1")
set(ENV{BUILD_PREFIX} "/usr/local/build_prefix")
set(ENV{PREFIX} "/opt/local/prefix")
set(ENV{CONDA_PREFIX} "/opt/conda/prefix")
set(NVBench_ENABLE_CUPTI OFF)
rapids_cpm_init()
rapids_cpm_nvbench()

Expand Down

0 comments on commit c99b5c9

Please sign in to comment.