First-order CUDA follow-up fix: do not use NVTX
Description
Remove use of NVTX from the develop branch. This is a profiling feature that is not needed for everybody out there. People who know about it can add the relevant lines themselves.
It is currently very troublesome because the transition from the NVTX library to header-only NVTX3 is complete on Windows, where NVTX has been removed, while NVTX3 does not even exist on Tegra, Jetson and maybe other Arm-based platforms. The removal is OK because NVTX is only relevant for very fine-grained debugging of the interplay between CPU and GPU. Its timing features can also be achieved by cudaEvents.
Seems to be confirmed in #161 that the PR fixes the problem. #161 is also proposing a few updates in the vcpkg portfile.
CUDA is always able to provide the timing of CUDA kernels running on the GPU to tools that observe this, either debuggers or performance analyzers. It is usually not able to register the timing and occupancy of threads on the CPU. NVTX is a mechanism that allows CPU code to add timestamps of its running threads into the same system.
That makes it possible to discover whether the CPU is working on something while the GPU is working on something else. It is not foolproof because NVTX knows nothing about the CPU's "occupancy" (whether it actually does something or is sleeping). But it can help to understand the communication between CPU and GPU better.
NVidia promises that it costs "nearly nothing", and I don't know how it actually compares to something like prof. It does create output for very nice performance analysers.
But it is most certainly not necessary to have it in the develop branch for everybody.
So while the transition from NVTX (version 2) to NVTX3 is ongoing and leads to cross-platform problems, I'd prefer to remove it entirely from the develop branch. There's probably nobody else than I who uses it anyway.
Without this PR, PopSift does not build on Linux with CUDA 12.6 any more.
@griwodz Do you think we can merge it?
Yes, I believe that this one is safe to merge.
On 26 Aug 2025, at 11:42, Simone Gasparini @.***> wrote:
[https://avatars.githubusercontent.com/u/1331744?s=20&v=4]simogasp left a comment (alicevision/popsift#162)https://github.com/alicevision/popsift/pull/162#issuecomment-3223432147
@griwodzhttps://github.com/griwodz Do you think we can merge it?
— Reply to this email directly, view it on GitHubhttps://github.com/alicevision/popsift/pull/162#issuecomment-3223432147, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAQCZAUBY2VHGVUKGIO23KD3PQTYRAVCNFSM6AAAAACE2HC6RCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEMRTGQZTEMJUG4. You are receiving this because you were mentioned.Message ID: @.***>