Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Turn on NVTX by default in Unix.
Browse files Browse the repository at this point in the history
  • Loading branch information
KellenSunderland committed Apr 19, 2019
1 parent da2f0c9 commit 379e2c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,15 @@ if(USE_CUDA)
message(WARNING "Could not find NCCL libraries")
endif()
endif()
find_package(NVTX)
if(NVTX_FOUND)
include_directories(${NVTX_INCLUDE_DIRS})
list(APPEND mxnet_LINKER_LIBS ${NVTX_LIBRARIES})
add_definitions(-DMXNET_USE_NVTX=1)
else()
message(WARNING "Could not find NVTX libraries")
if(UNIX)
find_package(NVTX)
if(NVTX_FOUND)
include_directories(${NVTX_INCLUDE_DIRS})
list(APPEND mxnet_LINKER_LIBS ${NVTX_LIBRARIES})
add_definitions(-DMXNET_USE_NVTX=1)
else()
message(WARNING "Could not find NVTX libraries")
endif()
endif()
else()
add_definitions(-DMSHADOW_USE_CUDA=0)
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindNVTX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ find_path(NVTX_INCLUDE_DIRS
)

find_library(NVTX_LIBRARIES
NAMES nvToolsExt64_1 nvToolsExt32_1 nvToolsExt
NAMES nvToolsExt64_1.lib nvToolsExt32_1.lib nvToolsExt
PATHS $ENV{NVTOOLSEXT_PATH} ${NVTX_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR}
PATH_SUFFIXES lib lib64 lib/Win32 lib/x64
)
Expand Down

0 comments on commit 379e2c8

Please sign in to comment.