Skip to content

Commit

Permalink
rocm: print all masks descriptors for events that contain them
Browse files Browse the repository at this point in the history
  • Loading branch information
gcongiu committed Dec 18, 2023
1 parent e1f0db0 commit 06a9185
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/rocm/roc_profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,20 @@ rocp_evt_code_to_info(uint64_t event_code, PAPI_event_info_t *info)
sprintf(info->long_descr, "%s", ntv_table_p->events[inf.nameid].descr);
break;
case (DEVICE_FLAG | INSTAN_FLAG):
{
int i;
char devices[PAPI_MAX_STR_LEN] = { 0 };
for (i = 0; i < device_table_p->count; ++i) {
if (rocc_dev_check(ntv_table_p->events[inf.nameid].device_map, i)) {
sprintf(devices + strlen(devices), "%i,", i);
}
}
*(devices + strlen(devices) - 1) = 0;
sprintf(info->symbol, "%s:device=%i:instance=%i", ntv_table_p->events[inf.nameid].name, inf.device, inf.instance);
sprintf(info->long_descr, "%s", ntv_table_p->events[inf.nameid].descr);
sprintf(info->long_descr, "%s, masks:Mandatory device qualifier [%s]:Mandatory instance qualifier in range [0-%i]",
ntv_table_p->events[inf.nameid].descr, devices, ntv_table_p->events[inf.nameid].instances - 1);
break;
}
case DEVICE_FLAG:
{
int i;
Expand Down

0 comments on commit 06a9185

Please sign in to comment.