For a Linux project, I am trying to profile a static library that makes use of CUDA NPP library calls. I would like to use the NVTX API to profile our routines to see which are the more efficient. However, even though the CUDA docs for NVTX speak of a nvToolsExt.a library, I can't find any such library in the 10.0 toolkit, although the shared libraries (ie libnvToolsExt.so) are there. Is it available anywhere, or has nVIDIA silently dropped support for profiling static libraries?
Asked
Active
Viewed 576 times
0
-
The distinction of libnvToolsExt.a vs. libnvToolsExt.so should only affect how you link your code to the tools library. It should have no bearing on whether you can profile code that is in a static library vs. whether you can profile code that is in a dynamic library. Stated another way, I should be able to have CUDA code in a static library that I profile using support provided by libnvToolsExt.so, even though that libary is dynamically linked to your application. – Robert Crovella Aug 02 '19 at 19:04
-
1I've looked at CUDA 8, 9.2, 10.0, and 10.1, and see no evidence of a `libnvToolsExt.a` in any of them. The [current doc](https://docs.nvidia.com/cuda/profiler-users-guide/index.html#nvtx-overview) also does not reference it (but does refer to the .so). So I don't think anything was "dropped" here, at least not recently. The provision of this tool in a dynamically linked library should not prevent your ability to use it with code in a static library. – Robert Crovella Aug 02 '19 at 19:11
-
1The only place I see a reference to it in documentation from NVIDIA is [here](https://docs.nvidia.com/gameworks/content/developertools/mobile/tegra_system_profiler/3.6-default/05-nvtx-trace.htm) and that is documentation for tegra, which is ARM, not x86. If you are on a ARM system, very likely you can locate `libnvToolsExt.a`. – Robert Crovella Aug 02 '19 at 19:14
-
The folks commenting above are correct, in that I was (eventually) able to get a version of my code to profile using just the dynamic libraries. My particular case was extra confusing as I needed to diagnose a static library that is linked into a dynamic plugin that is loaded at runtime, and my first half-dozen attempts at getting that to link failed. I did eventually work it out though. – swestrup Aug 04 '19 at 19:29
1 Answers
0
CUDA 10 for Linux doesn't contain a statically-linked version of the NVIDA Toolkit Extensions (NVTX) library, only a dynamically-linked one.
the CUDA docs for NVTX speak of a
nvToolsExt.a
library
As far as I, and RobertCrovella in his comment, can tell - the documentation doesn't refer to such statically-linked version of the library.

einpoklum
- 118,144
- 57
- 340
- 684