Skip to content

Commit

Permalink
[cuda] updating from classic NVXT to nvtx3
Browse files Browse the repository at this point in the history
  • Loading branch information
Carsten Griwodz committed Jul 31, 2024
1 parent 7bbad38 commit cdff08d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
9 changes: 6 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ add_library(popsift SHARED
target_link_libraries(popsift
PUBLIC
CUDA::cudart
CUDA::nvToolsExt
Threads::Threads)
# expected library to link was: "CUDA::nvtx3" but it appears to be simply nvToolsExt
# or maybe ${NVTX_LIBRARY} ???

if(PopSift_USE_NVTX_PROFILING)
target_link_libraries(popsift
PUBLIC
CUDA::nvtx3)
endif()

# It is necessary to choose between shared and static, otherwise the CUDA_RUNTIME_LIBRARY target property
# will not be set.
Expand Down
4 changes: 0 additions & 4 deletions src/application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ else()
set(PD_COMPILE_OPTIONS "" )
endif()

if(PopSift_USE_NVTX_PROFILING)
list(APPEND PD_LINK_LIBS ${CUDA_NVTX_LIBRARY})
endif(PopSift_USE_NVTX_PROFILING)

#############################################################
# popsift-demo
#############################################################
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/popsift.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <vector>

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangeStartA(a)
#define nvtxRangeEnd(a)
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/s_filtergrid.cu
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "sift_pyramid.h"

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangePushA(a)
#define nvtxRangePop()
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/s_image.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <iostream>

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangePushA(a)
#define nvtxRangePop()
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/s_orientation.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <cstdio>

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangePushA(a)
#define nvtxRangePop()
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/sift_desc.cu
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <iostream>

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangePushA(a)
#define nvtxRangePop()
Expand Down
2 changes: 1 addition & 1 deletion src/popsift/sift_pyramid.cu
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#endif

#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
#include <nvToolsExtCuda.h>
#include <nvtx3/nvToolsExtCuda.h>
#else
#define nvtxRangePushA(a)
#define nvtxRangePop()
Expand Down

0 comments on commit cdff08d

Please sign in to comment.