ROCpd support [Part 2] (#109)

* Rocpd part 2, caching

* Fix shadowed variables

* backward compatibility

* Fixed designated initializers

* Fix timemory include

* Remove benchmark & Fix build issues for rhel

* Add missing bracket

* Fix shadowing and pedantic

* Fix pedantic pt2

* Fix duplicated SDK calls

* Add decay in get_size_impl

* Rename sample cache to trace cache

* Add cache storage supported types

* Resolving track naming in sampling module

* fix sampling of flushing thread

* fix sampling of flushing thread 2

* throw exception upon store while buffer storage is not running

* Prevent fork crashing

* Fix rebase issue

* Applied suggestions from code review

* Change flushing thread to use PTL

* Fix agent creation order

* Fix stream id ci throw

* Remove force setup of rocprofiler-sdk

* Code cleanup

* Change initialization for agent

* Add missing namespace

* Fix the mismatch within the tool_agent->device_id

* Switch from using handle to use agent type index

* Fix pmc info comparator in metadata registry

---------

Co-authored-by: Aleksandar <aleksandar.djordjevic@amd.com>
Co-authored-by: Milan Radosavljevic <milan.radosavljevic@amd.com>
Co-authored-by: Marjan Antic <marantic@amd.com>
This commit is contained in:
systems-assistant[bot]
2025-08-19 22:01:04 -04:00
کامیت شده توسط GitHub
والد 351d598869
کامیت 1f86010ca2
40فایلهای تغییر یافته به همراه3432 افزوده شده و 1184 حذف شده
@@ -124,19 +124,20 @@ query_rocm_agents()
auto& _agent_manager = agent_manager::get_instance();
for(size_t i = 0; i < num_agents; ++i)
{
const auto* _agent = static_cast<const rocprofiler_agent_v0_t*>(agents[i]);
auto cur_agent = agent{
const auto* _agent = static_cast<const rocprofiler_agent_v0_t*>(agents[i]);
agent cur_agent;
cur_agent.type =
(_agent->type == ROCPROFILER_AGENT_TYPE_GPU ? agent_type::GPU
: agent_type::CPU),
_agent->device_id,
_agent->node_id,
_agent->logical_node_id,
_agent->logical_node_type_id,
std::string(_agent->name),
std::string(_agent->vendor_name),
std::string(_agent->product_name),
std::string(_agent->model_name),
};
: agent_type::CPU);
cur_agent.handle = _agent->id.handle;
cur_agent.device_id = _agent->device_id;
cur_agent.node_id = _agent->node_id;
cur_agent.logical_node_id = _agent->logical_node_id;
cur_agent.logical_node_type_id = _agent->logical_node_type_id;
cur_agent.name = std::string(_agent->name);
cur_agent.model_name = std::string(_agent->model_name);
cur_agent.vendor_name = std::string(_agent->vendor_name);
cur_agent.product_name = std::string(_agent->product_name);
_agent_manager.insert_agent(cur_agent);
}
return ROCPROFILER_STATUS_SUCCESS;