Add rocprofiler_query_counter_info function (#452)

* Add rocprofiler_query_counter_info function

Replaces rocprofiler_query_counter_name. Allows for
querying other types of info from counters (such as
description) and gives us some flexibility to add
return data in the near future (if we have to).

* source formatting (clang-format v11) (#453)

Co-authored-by: bwelton <bwelton@users.noreply.github.com>

* Updated version fetching

* source formatting (clang-format v11) (#509)

Co-authored-by: bwelton <bwelton@users.noreply.github.com>

* Merged

---------

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

[ROCm/rocprofiler-sdk commit: 7adffd5b22]
Tento commit je obsažen v:
Benjamin Welton
2024-02-19 16:05:38 -08:00
odevzdal GitHub
rodič cb6e12ab3a
revize 2d9779ad96
9 změnil soubory, kde provedl 119 přidání a 58 odebrání
+8 -5
Zobrazit soubor
@@ -460,11 +460,14 @@ dispatch_callback(rocprofiler_queue_id_t, /*queue_id*/
// Look for the counters contained in counters_to_collect in gpu_counters
for(auto& counter : gpu_counters)
{
const char* name;
size_t size;
ROCPROFILER_CALL(rocprofiler_query_counter_name(counter, &name, &size),
"Could not query name");
if(counters_to_collect.count(std::string(name)) > 0)
rocprofiler_counter_info_v0_t version;
ROCPROFILER_CALL(
rocprofiler_query_counter_info(
counter, ROCPROFILER_COUNTER_INFO_VERSION_0, static_cast<void*>(&version)),
"Could not query counter_id");
if(counters_to_collect.count(std::string(version.name)) > 0)
{
collect_counters.push_back(counter);
}