Skip to content

Commit

Permalink
SWDEV-495725: Skipping metadata init for unsupported agents (#1194)
Browse files Browse the repository at this point in the history
* SWDEV-495725: Skipping metadata init for unsupported agents

* Update source/lib/output/metadata.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: mclin <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 10, 2024
1 parent 89167f0 commit 576819a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/lib/output/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void metadata::init(inprocess)
{
if(itr.type == ROCPROFILER_AGENT_TYPE_CPU) continue;

ROCPROFILER_CHECK(rocprofiler_iterate_agent_supported_counters(
auto status = rocprofiler_iterate_agent_supported_counters(
itr.id,
[](rocprofiler_agent_id_t id,
rocprofiler_counter_id_t* counters,
Expand Down Expand Up @@ -135,7 +135,16 @@ void metadata::init(inprocess)
}
return ROCPROFILER_STATUS_SUCCESS;
},
&agent_counter_info));
&agent_counter_info);

if(status != ROCPROFILER_STATUS_ERROR_AGENT_ARCH_NOT_SUPPORTED)
{
ROCPROFILER_CHECK(status);
}
else
{
ROCP_WARNING << "Init failed for agent " << itr.node_id << " (" << itr.name << ")";
}
}
}

Expand Down

0 comments on commit 576819a

Please sign in to comment.