Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We need to change
#include <nvToolsExt.h>
into#include <nvtx3/nvToolsExt.h>
.The old form (
#include <nvToolsExt.h>
) requires linking to dynamic library (libnvToolsExt.so
), while the new form is header-only. In PR #548, @cliffburdick changed CMakeLists.txt to make matx link toCUDA::nvtx3
instead ofUDA::nvToolsExt
if CMake has a higher version that supports it. Thus if you use a CMake version >= 3.25, you will only use nvtx3 headers, without linking tolibnvToolsExt.so
. But we are still including the old<nvToolsExt.h>
, rather than the newer<nvtx3/nvToolsExt.h>
. For some functions, the old<nvToolsExt.h>
don't contain implementations. This makes the linking fail with undefined reference errors.For example, using CMake 3.28, I cannot build the
conv2d
target in examples. The linker outputs:To fix this error, we can change to use
#include <nvtx3/nvToolsExt.h>
. It's also recommended by NVTX's README: