NVIDIA / NVIDIA/nvbench

Document CUDA_ARCH considerations when installing NVBench

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

only: docs P0: must have
Dominant language
Cuda
Stars
927
Forks
123
Avg merge
2d 10h
Merged PRs (30d)
2

Description

Update

The information below is relevant, but outdated. #42 is adding install rules for NVBench. It's still extremely important to make sure that either:

  1. All projects involved are building with the same CMAKE_CUDA_ARCHITECTURE flags, or
  2. The installed NVBench is compiled with CMAKE_CUDA_ARCHITECTURE set to contain every arch it could possibly run against.

But rather than not allow installation, we should just document the sharp edges clearly in the README.

Outdated

After some internal discussions, we ended up deciding that it would be best to not install nvbench or provide packages for it.

Since the library provides detailed information that is tightly coupled with the compilation process (virtual architecture targets, etc), the nvbench library must be compiled with the same CUDA flags as any downstream benchmarks. Otherwise, we'd report misleading per-device information and would likely introduce some ODR violations that result in unpredictable and hard to debug behavior. Ultimately, this means that we cannot provide a pre-built library that is well-behaved.

To avoid these issues, it's best to build nvbench as part of the downstream benchmark suite, including it via CPM or git submodule, similar to https://github.com/NVIDIA/nvbench_demo or https://github.com/allisonvacanti/thrust_benchmark. This way, we can ensure that the resulting binaries are accurate and stable.

This may change someday, but would require careful consideration of the issues and edgecases that would arise from sharing the nvbench library implementation.

I need to document this better and remove some of the misleading comments from our CMake code, which was written before I realized that the library should not be pre-built or shared between projects.

(Taken from PR #20)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README and the CMake code comments referenced in the issue, then compare them with the updated installation context from #42. Document the CMAKE_CUDA_ARCHITECTURE requirements and remove misleading installation guidance; done means the README clearly explains the supported installation sharp edges.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.