NVTX C++ API release model

What is the release model of NVTX C++ API? All CUDA distributions, released after NVTX v3.1.0-c-cpp, don’t ship nvtx3.hpp header. What is a “proper” way for users to obtain NVTX C++ API implementation?

This post is a duplicate of github issue.

@jasoncohen can you respond to this.

1 Like

Hi @markshachkov,

The release model is that the release branch on the github repo is always going to be the newest version supported by NVIDIA’s developer tools (including graphics tools that don’t ship with CUDA), and we try to get the newest version into the CUDA toolkit quickly afterwards. Obviously I have not honored that “quickly” part since the 3.1 release, but I am currently working to get the NVTX C++ API, the CMake files, and the extensions currently in progress in the dev branch into the CUDA Toolkit for 12.4. I unfortunately missed the window to get these into 12.3, and there are still some issues with a few supported compilers and packaging details I’m working out right now, but the problems will definitely be fixed in time to include all these things in 12.4.

In the meantime, there are a few recommended ways to get nvtx3.hpp:

  • Download nvtx3.hpp from the release-v3 or release-v3-c-cpp github branches or the v3.1.0-c-cpp tag, and drop that file into the nvtx3 header directory in your CUDA toolkit’s files. The C API headers already in the toolkit will work fine with nvtx3.hpp from github.

  • Ignore the CUDA toolkit’s copy of NVTX and get it entirely from the github v3.1.0-c-cpp tag. The headers are about 330 kB in total. If you change CUDA toolkits frequently, this approach will be more convenient. Be sure to add your copy of NVTX to the compiler’s include search paths. The best practice here is to add a -I for the directory containing the nvtx3 directory, so you type #include <nvtx3/nvtx3.hpp> in your code.

  • Use CPM (CMake Package Manager) to automatically download v3.1.0-c-cpp from github as part of your build’s configure step – see details in the README on github. This approach is a non-starter if you need clean builds to run offline. For large libraries this approach is usually undesirable, but it is convenient for NVTX given that it’s small and dependency-free.

I will reply to this case and tag you when we ship a version of the CUDA toolkit with the C++ headers included.

Hi @jasoncohen, thanks for the info!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.