Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NVTX profile ranges through toggleable macros #122

Open
wants to merge 1 commit into
base: nest-gpu-2.0-mpi-comm
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ set( with-includes OFF CACHE STRING "Add additional include paths [default=OFF].
set( with-defines OFF CACHE STRING "Additional defines, e.g. '-DXYZ=1' [default=OFF]. Separate multiple defines by ';'." )
set( with-max-rreg-count "55" CACHE STRING "Set a maximum amount of register used when compiling [default=55]. Separate multiple flags by ';'." )
set( with-ptxas-options OFF CACHE STRING "Options for ptxas compiling [default=OFF]. Separate multiple flags by ';'." )
set( with-nvtx OFF CACHE STRING "Enable compilation with NVTX ranges." )

# generic build configuration
set( with-version-suffix OFF CACHE STRING "Set a user defined version suffix [default='']." )
Expand Down Expand Up @@ -130,6 +131,7 @@ nest_process_with_optimize()
nest_process_with_debug()
nest_process_with_warning()
nestgpu_post_process_compile_flags()
nestgpu_process_with_nvtx()

nest_process_version_suffix()

Expand Down
8 changes: 8 additions & 0 deletions cmake/ProcessOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ function( NESTGPU_POST_PROCESS_COMPILE_FLAGS )
endfunction()


function( NESTGPU_PROCESS_WITH_NVTX )
set( HAVE_NVTX OFF PARENT_SCOPE )
if ( with-nvtx )
set( HAVE_NVTX ON PARENT_SCOPE )
endif()
endfunction()


function( NEST_PROCESS_VERSION_SUFFIX )
if ( with-version-suffix )
foreach ( flag ${with-version-suffix} )
Expand Down
3 changes: 3 additions & 0 deletions libnestutil/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1

/* Define to 1 for compiling with nvtx ranges. */
#cmakedefine HAVE_NVTX 1

/* Version number of package */
#define VERSION @NEST_GPU_VERSION_STRING@

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ nestgpu_C.h
neuron_models.h
ngpu_exception.h
node_group.h
nvtx_macros.h
parrot_neuron.h
poiss_gen.h
poiss_gen_variables.h
Expand Down
Loading