Skip to content

Commit

Permalink
Working kernel measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Jul 23, 2020
1 parent d03088f commit 8606ed1
Show file tree
Hide file tree
Showing 7 changed files with 489 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules)
if(APEX_USE_CUDA)
enable_language(CUDA)
find_package(CUDAToolkit REQUIRED QUIET COMPONENTS CUPTI)
set(USE_CLOCK_TIMESTAMP ON)
endif(APEX_USE_CUDA)

# if the user didn't specify, set the installation directory.
Expand Down Expand Up @@ -572,6 +573,15 @@ endif()
# Just in case, to prevent concurrent builds
add_dependencies (project_otf2 project_activeharmony)

################################################################################
# CUDA configuration
################################################################################

if (APEX_USE_CUDA)
set(LIBS ${LIBS} cuda ${CUDA_cupti_LIBRARY})
add_definitions(-DAPEX_USE_CUDA)
endif (APEX_USE_CUDA)

################################################################################
# MSR configuration
################################################################################
Expand Down
9 changes: 9 additions & 0 deletions src/apex/CMakeLists.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ if (OTF2_FOUND)
SET(OTF2_SOURCE otf2_listener.cpp)
endif(OTF2_FOUND)

if (APEX_USE_CUDA)
SET(CUPTI_SOURCE activity_trace_async.cpp)
endif(APEX_USE_CUDA)

# Try to keep this in alphabetical order
SET(all_SOURCE
${CUPTI_SOURCE}
apex.cpp
apex_options.cpp
apex_policies.cpp
Expand Down Expand Up @@ -75,6 +80,10 @@ if (MPI_CXX_FOUND)
include_directories (${MPI_CXX_INCLUDE_PATH})
endif(MPI_CXX_FOUND)

if (APEX_USE_CUDA)
include_directories (${CUDAToolkit_INCLUDE_DIR})
endif(APEX_USE_CUDA)

# If we are building libapex.so, we want to include all the other libraries,
# so that we can LD_PRELOAD this library with all requirements met.
if (NOT BUILD_STATIC_EXECUTABLES)
Expand Down
Loading

0 comments on commit 8606ed1

Please sign in to comment.