Skip to content
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

Will NVTX3 ship the C++ V1 API for eternity? #96

Open
bernhardmgruber opened this issue May 20, 2024 · 0 comments
Open

Will NVTX3 ship the C++ V1 API for eternity? #96

bernhardmgruber opened this issue May 20, 2024 · 0 comments

Comments

@bernhardmgruber
Copy link

bernhardmgruber commented May 20, 2024

We have included the NVTX3 C++ wrapper into the CCCL/CUB and hit a couple of challenges on how NVTX and CCCL can evolve with minimal maintenance effort. I am tempted to think the best way is to use NVTX3 like:

Inside CCCL/CUB:

#if __has_include(<nvtx3/nvtx3.hpp>)
#  include <nvtx3/nvtx3.hpp>
#  ifndef NVTX3_CPP_DEFINITIONS_V1_0
#    error 
#  endif
...
nvtx::v1::scoped_range
#endif

This way, we are independent of whether the user defines NVTX3_CPP_REQUIRE_EXPLICIT_VERSION or not (see discussion in #93) and whether they use a newer NVTX3 version, since we use the oldest API. We can happily ship CCCL and as long as we don't need any new NVTX features, this code would work if and for as long as nvtx3/nvtx3.hpp will exist.

So, does the NVTX3 C++ wrapper guarantee that if you release a new version, e.g. NVTX3 V2 or V66, all the V1 symbols will still be available, forever? An NVTX4 library can of course break this, and would also require new work on cmake, etc.

There is a comment section in nvtx3.hpp that suggests this, but I want to be sure: https://github.com/NVIDIA/NVTX/blob/release-v3/c/include/nvtx3/nvtx3.hpp#L2835-L2841

bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue May 20, 2024
The explicit V1 API is always available. See discussion here:
NVIDIA/NVTX#96

Fixes: NVIDIA#1750
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue May 20, 2024
The explicit V1 API is always available. See discussion here:
NVIDIA/NVTX#96

Fixes: NVIDIA#1750
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jun 4, 2024
The explicit V1 API is always available. See discussion here:
NVIDIA/NVTX#96

Fixes: NVIDIA#1750
bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 5, 2024
The explicit V1 API is always available. See discussion here:
NVIDIA/NVTX#96

Fixes: NVIDIA#1750
bernhardmgruber added a commit to NVIDIA/cccl that referenced this issue Jul 5, 2024
* Simplify NVTX tests
* Add test for explicit user-side NVTX API use
* Program against explicitly versioned NVTX V1 API

The explicit V1 API is always available. See discussion here:
NVIDIA/NVTX#96

Fixes: #1750
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant