3

On Linux, if you have /path/to/cuda-10.0/include in your include path, you can #include <nvToolsExt.h>, and life is good. However, a collaborator using Windows has just told me that (with CUDA 10), the nvtx-related include files are in a subdirectory of the general CUDA include directory, named nvtx3.

I don't use Windows, but I can't believe he got it wrong, so:

  • How come there's a different include directory structure?
  • Why has this happened with CUDA 10 as opposed to previous versions?
paleonix
  • 2,293
  • 1
  • 13
  • 29
einpoklum
  • 118,144
  • 57
  • 340
  • 684

1 Answers1

1

To quote the the How do I use NVTX in my code? section of the README in the NVTX repository:

NOTE: Older versions of NVTX did require linking against a dynamic library. NVTX version 3 provides the same API, but removes the need to link with any library. Ensure you are including NVTX v3 by using the nvtx3 directory as a prefix in your #includes: [...]

Another section of interest is Get NVTX with the CUDA Toolkit:

The CUDA toolkit provides NVTX v3. Note that the toolkit may also include older versions for backwards compatibility, so be sure to use version 3 (the nvtx3 subdirectory of headers) for best performance, convenience, and support. Use #include <nvtx3/nvToolsExt.h> instead of #include <nvToolsExt.h> to ensure code is including v3!

It seems like the existence of the nvtx3 subdirectory is not Windows-specific. Maybe the Windows version of the CUDA toolkit your colleague was using did not include those older versions for backwards compatibility or he ignored them.

paleonix
  • 2,293
  • 1
  • 13
  • 29