From 5cc7fac7fdd9377f8ff35a5741b523d1c5fa6798 Mon Sep 17 00:00:00 2001 From: Kevin Huck Date: Thu, 28 Apr 2022 18:16:18 -0400 Subject: [PATCH] Minor changes and bug fixes from testing on crusher. Kokkos doesn't include the device ID any more (assume 0). When accumulated is 0.0, assume the timer hasn't been stopped. --- src/apex/apex_kokkos.cpp | 6 ++++++ src/apex/dependency_tree.cpp | 2 +- src/apex/hip_trace.cpp | 4 ++-- src/openmp/ompt_target_matmult.c | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/apex/apex_kokkos.cpp b/src/apex/apex_kokkos.cpp index 8c0fc0b8..903cfb05 100644 --- a/src/apex/apex_kokkos.cpp +++ b/src/apex/apex_kokkos.cpp @@ -96,11 +96,17 @@ inline ExecutionSpaceIdentifier identifier_from_devid(const uint32_t in) { ((in & 0x00FFFFFF) >> 17), // next 7 bits (in & 0x0001FFFF)}; // last 17 bits */ +#if 0 constexpr const uint32_t shift = num_avail_bits - num_type_bits; return {devicetype_from_uint32t(in >> shift), /*First 8 bits*/ (~((uint32_t(-1)) << num_device_bits)) & (in >> num_instance_bits), /*Next 7 bits */ (~((uint32_t(-1)) << num_instance_bits)) & in}; /*Last 17 bits*/ +#else + constexpr const uint32_t shift = num_instance_bits; + return {devicetype_from_uint32t(in >> shift), /*First 8 bits*/ + 0, (~((uint32_t(-1)) << num_instance_bits)) & in}; /*Last 17 bits*/ +#endif } /* "Top 8 bits represent the device type. Next 7 are the device id (think diff --git a/src/apex/dependency_tree.cpp b/src/apex/dependency_tree.cpp index d0d6a4a4..f7851ad1 100644 --- a/src/apex/dependency_tree.cpp +++ b/src/apex/dependency_tree.cpp @@ -73,7 +73,7 @@ void Node::writeNode(std::ofstream& outfile, double total) { outfile << std::endl; } - double acc = (data == task_identifier::get_main_task_id()) ? + double acc = (data == task_identifier::get_main_task_id() || accumulated == 0.0) ? total : accumulated; node_color * c = get_node_color_visible(acc, 0.0, total); double ncalls = (calls == 0) ? 1 : calls; diff --git a/src/apex/hip_trace.cpp b/src/apex/hip_trace.cpp index bbe30773..9e5c49e9 100644 --- a/src/apex/hip_trace.cpp +++ b/src/apex/hip_trace.cpp @@ -261,7 +261,7 @@ void handle_roctx(uint32_t domain, uint32_t cid, const void* callback_data, void case ROCTX_API_ID_roctxRangePushA: { std::stringstream ss; - ss << "roctx: " << data->args.message; + ss /* << "roctx: " */ << data->args.message; timer_stack.push(apex::start(ss.str())); break; } @@ -274,7 +274,7 @@ void handle_roctx(uint32_t domain, uint32_t cid, const void* callback_data, void case ROCTX_API_ID_roctxRangeStartA: { std::stringstream ss; - ss << "roctx: " << data->args.message; + ss /* << "roctx: " */ << data->args.message; apex::profiler* p = apex::start(ss.str()); const std::lock_guard guard(map_lock); timer_map.insert( diff --git a/src/openmp/ompt_target_matmult.c b/src/openmp/ompt_target_matmult.c index 76cbaf2f..c5b1833b 100644 --- a/src/openmp/ompt_target_matmult.c +++ b/src/openmp/ompt_target_matmult.c @@ -13,7 +13,7 @@ #include #ifndef MATRIX_SIZE -#define MATRIX_SIZE 4096 +#define MATRIX_SIZE 1024 #endif #define MAX_ITERATIONS 3