Skip to content
Merged
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
77 changes: 22 additions & 55 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,28 @@ add_caliper_option(WITH_FORTRAN "Install Fortran interface" FALSE)
add_caliper_option(WITH_PYTHON_BINDINGS "Install Python bindings" FALSE)
add_caliper_option(WITH_TOOLS "Build Caliper tools" TRUE)

add_caliper_option(WITH_NVTX "Enable NVidia nvtx bindings for NVprof and NSight (requires CUDA)" FALSE)
add_caliper_option(WITH_CUPTI "Enable CUPTI service (CUDA performance analysis)" FALSE)
add_caliper_option(WITH_PAPI "Enable PAPI hardware counter service (requires papi)" FALSE)
add_caliper_option(WITH_LIBPFM "Enable libpfm (perf_event) sampling" FALSE)
add_caliper_option(WITH_LIBDW "Enable libdw support (for symbollookup service)" FALSE)
add_caliper_option(WITH_LIBUNWIND "Enable libunwind support (for callpath service)" FALSE)
add_caliper_option(WITH_MPI "Enable MPI" FALSE)
# add_caliper_option(WITH_MPIT "Enable MPI-T" FALSE)
add_caliper_option(WITH_OMPT "Enable OMPT" FALSE)
add_caliper_option(WITH_SAMPLER "Enable Linux sampler (x86 and PPC Linux only)" FALSE)
add_caliper_option(WITH_GOTCHA "Enable GOTCHA wrapping" ${CALIPER_HAVE_LINUX})
add_caliper_option(WITH_ROCTX "Enable AMD RocTX support" FALSE)
add_caliper_option(WITH_ROCTRACER "Enable AMD RocTracer support" FALSE)
add_caliper_option(WITH_ROCM "Enable AMD RocTracer and RocTX support" FALSE)
add_caliper_option(WITH_NVTX "Enable NVidia nvtx bindings for NVprof and NSight (requires CUDA)" FALSE)
add_caliper_option(WITH_CUPTI "Enable CUPTI service (CUDA performance analysis)" FALSE)
add_caliper_option(WITH_PAPI "Enable PAPI hardware counter service (requires papi)" FALSE)
add_caliper_option(WITH_LIBPFM "Enable libpfm (perf_event) sampling" FALSE)
add_caliper_option(WITH_LIBDW "Enable libdw support (for symbollookup service)" FALSE)
add_caliper_option(WITH_LIBUNWIND "Enable libunwind support (for callpath service)" FALSE)
add_caliper_option(WITH_MPI "Enable MPI" FALSE)
# add_caliper_option(WITH_MPIT "Enable MPI-T" FALSE)
add_caliper_option(WITH_OMPT "Enable OMPT" FALSE)
add_caliper_option(WITH_SAMPLER "Enable Linux sampler (x86 and PPC Linux only)" FALSE)
add_caliper_option(WITH_GOTCHA "Enable GOTCHA wrapping" ${CALIPER_HAVE_LINUX})
add_caliper_option(WITH_ROCM "Enable AMD ROCm profiling support (identical to WITH_ROCPROFILER)" FALSE)
add_caliper_option(WITH_ROCPROFILER "Enable AMD rocprofiler-sdk support" FALSE)
add_caliper_option(WITH_TAU "Enable TAU service (TAU Performance System)" FALSE)
add_caliper_option(WITH_VTUNE "Enable Intel(R) VTune(tm) annotation bindings" FALSE)
add_caliper_option(WITH_ADIAK "Enable adiak support" FALSE)
add_caliper_option(WITH_KOKKOS "Enable Kokkos profiling support" TRUE)
add_caliper_option(WITH_PCP "Enable performance co-pilot support" FALSE)
add_caliper_option(WITH_VARIORUM "Enable Variorum support" FALSE)
add_caliper_option(WITH_UMPIRE "Enable Umpire statistics support" FALSE)
add_caliper_option(WITH_CRAYPAT "Enable CrayPAT region forwarding support" FALSE)
add_caliper_option(WITH_LDMS "Enable LDMS forwarder" FALSE)
add_caliper_option(WITH_TAU "Enable TAU service (TAU Performance System)" FALSE)
add_caliper_option(WITH_VTUNE "Enable Intel(R) VTune(tm) annotation bindings" FALSE)
add_caliper_option(WITH_ADIAK "Enable adiak support" FALSE)
add_caliper_option(WITH_KOKKOS "Enable Kokkos profiling support" TRUE)
add_caliper_option(WITH_PCP "Enable performance co-pilot support" FALSE)
add_caliper_option(WITH_VARIORUM "Enable Variorum support" FALSE)
add_caliper_option(WITH_UMPIRE "Enable Umpire statistics support" FALSE)
add_caliper_option(WITH_CRAYPAT "Enable CrayPAT region forwarding support" FALSE)
add_caliper_option(WITH_LDMS "Enable LDMS forwarder" FALSE)

set(WITH_ARCH "" CACHE STRING "Enable features specific to the provided archspec CPU architecture name")
if (NOT WITH_ARCH STREQUAL "")
Expand Down Expand Up @@ -338,36 +336,7 @@ if (WITH_MPI)
endif()
endif()

if (WITH_ROCPROFILER AND (WITH_ROCTX OR WITH_ROCTRACER))
message(WARNING "ROCPROFILER and ROCTX/ROCTRACER support are both enabled.\n"
"This is not recommended, please select either ROCPROFILER or ROCTRACER/ROCTX")
endif()

if (WITH_ROCTX OR WITH_ROCM)
include(FindRocTX)
if (ROCTX_FOUND)
set(CALIPER_HAVE_ROCTX TRUE)
set(CALIPER_RocTX_CMAKE_MSG "Yes, using ${ROCTX_LIBRARIES}")
list(APPEND CALIPER_EXTERNAL_LIBS ${ROCTX_LIBRARIES})
else()
message(WARNING "RocTX support requested but ROCm was not found!\n"
"Set ROCM_PATH to installation path and re-run cmake.")
endif()
endif()

if (WITH_ROCTRACER OR WITH_ROCM)
include(FindRoctracer)
if (ROCTRACER_FOUND)
set(CALIPER_HAVE_ROCTRACER TRUE)
set(CALIPER_RocTracer_CMAKE_MSG "Yes, using ${ROCTRACER_LIBRARIES}")
list(APPEND CALIPER_EXTERNAL_LIBS ${ROCTRACER_LIBRARIES})
else()
message(WARNING "RocTracer support requested but ROCm was not found!\n"
"Set ROCM_PATH to installation path and re-run cmake.")
endif()
endif()

if (WITH_ROCPROFILER)
if (WITH_ROCPROFILER OR WITH_ROCM)
find_package(rocprofiler-sdk REQUIRED)
find_package(rocprofiler-sdk-roctx REQUIRED)
if (rocprofiler-sdk_FOUND)
Expand Down Expand Up @@ -641,8 +610,6 @@ set(CALIPER_MODULES
Nvtx
CUpti
Kokkos
RocTracer
RocTX
rocprofiler
TAU
VTune
Expand Down
28 changes: 0 additions & 28 deletions cmake/FindRocTX.cmake

This file was deleted.

61 changes: 0 additions & 61 deletions cmake/FindRoctracer.cmake

This file was deleted.

19 changes: 9 additions & 10 deletions src/caliper/controllers/ROCmActivityProfileController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ class RocmActivityProfileController : public cali::ChannelController
}

std::string q_local =
" let act_count=first(sum#count,count) if rocm.activity"
",dmin=scale(min#rocm.activity.duration,1e-9)"
" let "
" dmin=scale(min#rocm.activity.duration,1e-9)"
",davg=scale(avg#rocm.activity.duration,1e-9)"
",dmax=scale(max#rocm.activity.duration,1e-9)"
" select *,scale(sum#time.duration.ns,1e-9) as time"
" select *,scale(sum#rocm.host.duration,1e-9) as time"
",scale(sum#rocm.activity.duration,1e-9) as \"time (gpu)\""
",min(dmin) as \"min time/inst\""
",avg(davg) as \"avg time/inst\""
",max(dmax) as \"max time/inst\""
",sum(act_count) as count"
",sum(sum#rocm.activity.count) as instances"
" group by path,rocm.kernel.name,rocm.activity,mpi.rank "
" format ";

Expand Down Expand Up @@ -127,14 +127,13 @@ const char* controller_spec = R"json(
"name" : "rocm-activity-profile",
"description" : "Record AMD ROCm activities and a write profile",
"categories" : [ "adiak", "metric", "output", "region", "event" ],
"services" : [ "aggregate", "roctracer", "event", "timer" ],
"services" : [ "aggregate", "rocprofiler", "event" ],
"config" :
{
"CALI_CHANNEL_FLUSH_ON_EXIT" : "false",
"CALI_EVENT_ENABLE_SNAPSHOT_INFO" : "false",
"CALI_ROCTRACER_TRACE_ACTIVITIES" : "true",
"CALI_ROCTRACER_RECORD_KERNEL_NAMES": "true",
"CALI_ROCTRACER_SNAPSHOT_DURATION" : "false"
"CALI_CHANNEL_FLUSH_ON_EXIT": "false",
"CALI_EVENT_ENABLE_SNAPSHOT_INFO": "false",
"CALI_ROCPROFILER_ENABLE_ACTIVITY_TRACING": "true",
"CALI_ROCPROFILER_ENABLE_SNAPSHOT_TIMESTAMPS": "true"
},
"defaults" : { "node.order": "true", "memcpy": "true" },
"options":
Expand Down
24 changes: 12 additions & 12 deletions src/caliper/controllers/ROCmActivityReportController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ class RocmActivityReportController : public cali::ChannelController
{
// Config for local aggregation
std::string local_select =
" inclusive_scale(sum#time.duration.ns,1e-9) as \"Host Time\""
" inclusive_scale(sum#rocm.host.duration,1e-9) as \"Host Time\""
",inclusive_scale(sum#rocm.activity.duration,1e-9) as \"GPU Time\""
",inclusive_ratio(sum#rocm.activity.duration,sum#time.duration.ns,100.0) as \"GPU %\"";
",inclusive_ratio(sum#rocm.activity.duration,sum#rocm.host.duration,100.0) as \"GPU %\"";

// Config for second aggregation step in MPI mode (cross-process aggregation)
std::string cross_select =
" avg(iscale#sum#time.duration.ns) as \"Avg Host Time\""
",max(iscale#sum#time.duration.ns) as \"Max Host Time\""
" avg(iscale#sum#rocm.host.duration) as \"Avg Host Time\""
",max(iscale#sum#rocm.host.duration) as \"Max Host Time\""
",avg(iscale#sum#rocm.activity.duration) as \"Avg GPU Time\""
",max(iscale#sum#rocm.activity.duration) as \"Max GPU Time\""
",ratio(iscale#sum#rocm.activity.duration,iscale#sum#time.duration.ns,100.0) as \"GPU %\"";
",ratio(iscale#sum#rocm.activity.duration,iscale#sum#rocm.host.duration,100.0) as \"GPU %\"";

std::string groupby = "path";

Expand Down Expand Up @@ -119,15 +119,16 @@ const char* controller_spec = R"json(
{
"name" : "rocm-activity-report",
"description" : "Record and print AMD ROCm activities (kernel executions, memcopies, etc.)",
"categories" : [ "output", "region", "treeformatter", "event" ],
"services" : [ "aggregate", "roctracer", "event", "timer" ],
"categories" : [ "output", "region", "treeformatter", "event", "metric" ],
"services" : [ "aggregate", "rocprofiler", "event" ],
"config" :
{
"CALI_CHANNEL_FLUSH_ON_EXIT" : "false",
"CALI_EVENT_ENABLE_SNAPSHOT_INFO" : "false",
"CALI_ROCTRACER_TRACE_ACTIVITIES" : "true"
"CALI_CHANNEL_FLUSH_ON_EXIT" : "false",
"CALI_EVENT_ENABLE_SNAPSHOT_INFO" : "false",
"CALI_ROCPROFILER_ENABLE_ACTIVITY_TRACING" : "true",
"CALI_ROCPROFILER_ENABLE_SNAPSHOT_TIMESTAMPS" : "true"
},
"defaults" : { "order_as_visited": "true", "output.append": "true" },
"defaults": { "order_as_visited": "true", "output.append": "true" },
"options":
[
{
Expand All @@ -137,7 +138,6 @@ const char* controller_spec = R"json(
},{
"name": "show_kernels",
"type": "bool",
"config": { "CALI_ROCTRACER_RECORD_KERNEL_NAMES": "true" },
"description": "Show kernel names"
},{
"name": "output.append",
Expand Down
8 changes: 4 additions & 4 deletions src/caliper/controllers/controllers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,16 +701,16 @@ const char* builtin_rocm_option_specs = R"json(
"type": "bool",
"description": "Profile HIP API functions",
"category": "region",
"services": [ "roctracer" ],
"config": { "CALI_ROCTRACER_TRACE_ACTIVITIES": "false" }
"services": [ "rocprofiler" ],
"config": { "CALI_ROCPROFILER_ENABLE_API_CALLBACKS": "true" }
},
{
"name": "rocm.gputime",
"description": "Report GPU time in AMD ROCm activities",
"type": "bool",
"category": "metric",
"services": [ "roctracer" ],
"config": { "CALI_ROCTRACER_TRACE_ACTIVITIES": "true", "CALI_ROCTRACER_RECORD_KERNEL_NAMES": "false" },
"services": [ "rocprofiler" ],
"config": { "CALI_ROCPROFILER_ENABLE_ACTIVITY_TRACING": "true" },
"query":
{
"local": "let t.gpu.r=first(sum#rocm.activity.duration,rocm.activity.duration) select inclusive_scale(t.gpu.r,1e-9) as \"GPU time (I)\" unit sec,scale(t.gpu.r,1e-9) as \"GPU time (E)\" unit sec",
Expand Down
6 changes: 0 additions & 6 deletions src/services/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ endif()
if (CALIPER_HAVE_PCP)
add_subdirectory(pcp)
endif()
if (CALIPER_HAVE_ROCTX)
add_subdirectory(roctx)
endif()
if (CALIPER_HAVE_ROCTRACER)
add_subdirectory(roctracer)
endif()
if (CALIPER_HAVE_ROCPROFILER)
add_subdirectory(rocprofiler)
endif()
Expand Down
1 change: 0 additions & 1 deletion src/services/rocprofiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ target_link_libraries(caliper-rocprofiler PRIVATE
add_service_objlib("caliper-rocprofiler")

add_caliper_service("rocprofiler CALIPER_HAVE_ROCPROFILER")
add_caliper_service("roctracer CALIPER_HAVE_ROCPROFILER")
add_caliper_service("roctx CALIPER_HAVE_ROCPROFILER")
Loading
Loading