Skip to content

Commit abef1d4

Browse files
author
Carsten Griwodz
committed
Remove profiling nvtx from develop branch.
This make trouble for continuous integration and is apparently not supported on all platforms. Since it is a debug function, it's just as well to remove it from the mainstream tree.
1 parent 8623b69 commit abef1d4

File tree

12 files changed

+1
-103
lines changed

12 files changed

+1
-103
lines changed

CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_SYSTEM_NAME}-$
2828

2929
option(PopSift_BUILD_EXAMPLES "Build PopSift applications." ON)
3030
option(PopSift_BUILD_DOCS "Build PopSift documentation." OFF)
31-
option(PopSift_USE_NVTX_PROFILING "Use CUDA NVTX for profiling." OFF)
3231
option(PopSift_ERRCHK_AFTER_KERNEL "Synchronize and check CUDA error after every kernel." OFF)
3332
option(PopSift_USE_POSITION_INDEPENDENT_CODE "Generate position independent code." ON)
3433
option(PopSift_USE_GRID_FILTER "Switch off grid filtering to massively reduce compile time while debugging other things." ON)
@@ -99,10 +98,6 @@ find_package(CUDAToolkit)
9998
message(STATUS "CUDA Version is ${CUDAToolkit_VERSION}")
10099
set(CUDA_VERSION ${CUDAToolkit_VERSION})
101100

102-
if(PopSift_USE_NVTX_PROFILING)
103-
message(STATUS "PROFILING CPU CODE: NVTX is in use")
104-
endif()
105-
106101
if(PopSift_ERRCHK_AFTER_KERNEL)
107102
message(STATUS "Synchronizing and checking errors after every kernel call")
108103
list(APPEND CUDA_NVCC_FLAGS "-DERRCHK_AFTER_KERNEL")
@@ -153,13 +148,6 @@ else()
153148
set(DISABLE_GRID_FILTER 0)
154149
endif()
155150

156-
if(PopSift_USE_NVTX_PROFILING)
157-
# library required for NVTX profiling of the CPU
158-
set(PopSift_USE_NVTX 1)
159-
else()
160-
set(PopSift_USE_NVTX 0)
161-
endif()
162-
163151
add_subdirectory(src)
164152

165153
if(PopSift_BUILD_DOCS)
@@ -197,7 +185,6 @@ message(STATUS "Build Shared libs: " ${BUILD_SHARED_LIBS})
197185
message(STATUS "Build examples: " ${PopSift_BUILD_EXAMPLES})
198186
message(STATUS "Build documentation: " ${PopSift_BUILD_DOCS})
199187
message(STATUS "Generate position independent code: " ${CMAKE_POSITION_INDEPENDENT_CODE})
200-
message(STATUS "Use CUDA NVTX for profiling: " ${PopSift_USE_NVTX_PROFILING})
201188
message(STATUS "Synchronize and check CUDA error after every kernel: " ${PopSift_ERRCHK_AFTER_KERNEL})
202189
message(STATUS "Grid filtering: " ${PopSift_USE_GRID_FILTER})
203190
message(STATUS "Additional warning for CUDA nvcc: " ${PopSift_NVCC_WARNINGS})

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ install:
4444
before_build:
4545
- md build
4646
- cd build
47-
- cmake -G "Visual Studio 17 2022" -A x64 -T v143,host=x64,cuda="%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5" -DBUILD_SHARED_LIBS:BOOL=ON -DPopSift_USE_NVTX_PROFILING:BOOL=OFF -DPopSift_USE_GRID_FILTER:BOOL=OFF -DPopSift_BUILD_DOCS:BOOL=OFF -DPopSift_USE_POSITION_INDEPENDENT_CODE:BOOL=ON -DPopSift_BUILD_EXAMPLES:BOOL=ON -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
47+
- cmake -G "Visual Studio 17 2022" -A x64 -T v143,host=x64,cuda="%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5" -DBUILD_SHARED_LIBS:BOOL=ON -DPopSift_USE_GRID_FILTER:BOOL=OFF -DPopSift_BUILD_DOCS:BOOL=OFF -DPopSift_USE_POSITION_INDEPENDENT_CODE:BOOL=ON -DPopSift_BUILD_EXAMPLES:BOOL=ON -DCMAKE_BUILD_TYPE=%configuration% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
4848
- ls -l
4949

5050
build:

cmake/sift_config.h.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@
1313

1414
#define POPSIFT_HAVE_SHFL_DOWN_SYNC() @PopSift_HAVE_SHFL_DOWN_SYNC@
1515
#define POPSIFT_DISABLE_GRID_FILTER() @DISABLE_GRID_FILTER@
16-
#define POPSIFT_USE_NVTX() @PopSift_USE_NVTX@
1716

cudaInstallAppveyor.cmd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ echo Downloading CUDA toolkit 12 for Windows 10
44

55
appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-12.5.82-archive.zip -Filename cuda_nvcc.zip
66
appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-12.5.82-archive.zip -Filename cuda_cudart.zip
7-
appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-12.5.82-archive.zip -Filename cuda_nvtx.zip
87
appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-12.5.82-archive.zip -Filename vs_integration.zip
98
dir
109

1110
echo Unzipping CUDA toolkit 12
1211
tar -xf cuda_nvcc.zip
1312
tar -xf cuda_cudart.zip
14-
tar -xf cuda_nvtx.zip
1513
tar -xf vs_integration.zip
1614
dir
1715

@@ -22,7 +20,6 @@ mkdir "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5\extras"
2220
echo Copying toolkit files to install dir(s)
2321
xcopy cuda_cudart-windows-x86_64-12.5.82-archive "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5" /s /e /i /y
2422
xcopy cuda_nvcc-windows-x86_64-12.5.82-archive "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5" /s /e /i /y
25-
xcopy cuda_nvtx-windows-x86_64-12.5.82-archive "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5" /s /e /i /y
2623
xcopy visual_studio_integration-windows-x86_64-12.5.82-archive "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v12.5\extras" /s /e /i /y
2724

2825

src/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ target_link_libraries(popsift
4545
CUDA::cudart
4646
Threads::Threads)
4747

48-
if(PopSift_USE_NVTX_PROFILING)
49-
target_link_libraries(popsift
50-
PUBLIC
51-
CUDA::nvtx3)
52-
endif()
53-
5448
set_target_properties(popsift PROPERTIES VERSION ${PROJECT_VERSION})
5549
set_target_properties(popsift PROPERTIES DEBUG_POSTFIX "d")
5650
set_target_properties(popsift PROPERTIES CUDA_SEPARABLE_COMPILATION ON)

src/popsift/popsift.cu

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,18 +438,12 @@ void SiftJob::setImg( popsift::ImageBase* img )
438438

439439
popsift::ImageBase* SiftJob::getImg()
440440
{
441-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
442-
_nvtx_id = nvtxRangeStartA( "inserting image" );
443-
#endif
444441
return _img;
445442
}
446443

447444
void SiftJob::setFeatures( popsift::FeaturesBase* f )
448445
{
449446
_p.set_value( f );
450-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
451-
nvtxRangeEnd( _nvtx_id );
452-
#endif
453447
}
454448

455449
popsift::FeaturesHost* SiftJob::get()

src/popsift/popsift.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323
#include <thread>
2424
#include <vector>
2525

26-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
27-
#include <nvtx3/nvToolsExtCuda.h>
28-
#else
29-
#define nvtxRangeStartA(a)
30-
#define nvtxRangeEnd(a)
31-
#endif
32-
3326
/* user parameters */
3427
namespace popsift
3528
{
@@ -50,9 +43,6 @@ class SiftJob
5043
unsigned char* _imageData;
5144
popsift::ImageBase* _img;
5245
std::exception_ptr _err;
53-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
54-
nvtxRangeId_t _nvtx_id;
55-
#endif
5646

5747
public:
5848

src/popsift/s_filtergrid.cu

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
#include "sift_extremum.h"
1010
#include "sift_pyramid.h"
1111

12-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
13-
#include <nvtx3/nvToolsExtCuda.h>
14-
#else
15-
#define nvtxRangePushA(a)
16-
#define nvtxRangePop()
17-
#endif
18-
1912
#if ! POPSIFT_IS_DEFINED(POPSIFT_DISABLE_GRID_FILTER)
2013

2114
#include <thrust/copy.h>
@@ -317,9 +310,7 @@ int Pyramid::extrema_filter_grid( const Config& conf, int ext_total )
317310
}
318311
}
319312

320-
nvtxRangePushA( "writing back count" );
321313
writeDescCountersToDevice( );
322-
nvtxRangePop( );
323314

324315
return ret_ext_total;
325316
}

src/popsift/s_image.cu

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
#include <fstream>
1616
#include <iostream>
1717

18-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
19-
#include <nvtx3/nvToolsExtCuda.h>
20-
#else
21-
#define nvtxRangePushA(a)
22-
#define nvtxRangePop()
23-
#endif
24-
2518
using namespace std;
2619

2720
namespace popsift {
@@ -98,8 +91,6 @@ void Image::resetDimensions( int w, int h )
9891
destroyTexture( );
9992
createTexture( );
10093
} else {
101-
nvtxRangePushA( "reallocating host-side image memory" );
102-
10394
_max_w = max( w, _max_w );
10495
_max_h = max( h, _max_h );
10596
_input_image_h.freeHost( popsift::CudaAllocated );
@@ -111,21 +102,15 @@ void Image::resetDimensions( int w, int h )
111102

112103
destroyTexture( );
113104
createTexture( );
114-
115-
nvtxRangePop(); // "reallocating host-side image memory"
116105
}
117106
}
118107

119108
void Image::allocate( int w, int h )
120109
{
121-
nvtxRangePushA( "allocating host-side image memory" );
122-
123110
_input_image_h.allocHost( w, h, popsift::CudaAllocated );
124111
_input_image_d.allocDev( w, h );
125112

126113
createTexture( );
127-
128-
nvtxRangePop(); // "allocating host-side image memory"
129114
}
130115

131116
void Image::destroyTexture( )
@@ -222,8 +207,6 @@ void ImageFloat::resetDimensions( int w, int h )
222207
destroyTexture( );
223208
createTexture( );
224209
} else {
225-
nvtxRangePushA( "reallocating host-side image memory" );
226-
227210
_max_w = max( w, _max_w );
228211
_max_h = max( h, _max_h );
229212
_input_image_h.freeHost( popsift::CudaAllocated );
@@ -235,21 +218,15 @@ void ImageFloat::resetDimensions( int w, int h )
235218

236219
destroyTexture( );
237220
createTexture( );
238-
239-
nvtxRangePop(); // "reallocating host-side image memory"
240221
}
241222
}
242223

243224
void ImageFloat::allocate( int w, int h )
244225
{
245-
nvtxRangePushA( "allocating host-side image memory" );
246-
247226
_input_image_h.allocHost( w, h, popsift::CudaAllocated );
248227
_input_image_d.allocDev( w, h );
249228

250229
createTexture( );
251-
252-
nvtxRangePop(); // "allocating host-side image memory"
253230
}
254231

255232
void ImageFloat::destroyTexture( )

src/popsift/s_orientation.cu

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
#include <cmath>
1919
#include <cstdio>
2020

21-
#if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX)
22-
#include <nvtx3/nvToolsExtCuda.h>
23-
#else
24-
#define nvtxRangePushA(a)
25-
#define nvtxRangePop()
26-
#endif
27-
2821
using namespace popsift;
2922
using namespace std;
3023

0 commit comments

Comments
 (0)