Skip to content

Commit

Permalink
Minor changes and bug fixes from testing on crusher. Kokkos doesn't i…
Browse files Browse the repository at this point in the history
…nclude the device ID any more (assume 0). When accumulated is 0.0, assume the timer hasn't been stopped.
  • Loading branch information
khuck committed Apr 28, 2022
1 parent 493a012 commit 5cc7fac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/apex/apex_kokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/apex/dependency_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/apex/hip_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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<std::mutex> guard(map_lock);
timer_map.insert(
Expand Down
2 changes: 1 addition & 1 deletion src/openmp/ompt_target_matmult.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdlib.h>

#ifndef MATRIX_SIZE
#define MATRIX_SIZE 4096
#define MATRIX_SIZE 1024
#endif

#define MAX_ITERATIONS 3
Expand Down

0 comments on commit 5cc7fac

Please sign in to comment.