Profiler - Add partition support

NOTE: GPU ordering used is not the same as in HSA/HIP.

GPUs are ordered via amdsmi and then GPU_ID fields are compared to map
GPU partitions to each other.

Change-Id: If379214f5281d7d5ee98515b3e5ba7affc2e2197
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Galantsev, Dmitrii authored and Galantsev, Dmitrii committed 2025-06-03 19:34:00 -05:00
1 γονέας 2adc8f82c6
υποβολή 85b619b2f0
9 files changed
+172 -137

No files matched your search

@@ -69,18 +69,22 @@ class RdcRocpBase {
*/
static const uint32_t collection_duration_us_k = 10000;
double read_feature(rocprofiler_record_counter_t* record, uint32_t gpu_index);
/**
* @brief By default all profiler values are read as doubles
*/
double run_profiler(uint32_t gpu_index, rdc_field_t field);
void map_smi_to_profiler_by_uuid();
double run_profiler(uint32_t agent_index, rdc_field_t field);
/**
* @description Create a map from entity_id to profiler agent_index.
* This is required due to different structure and ordering.
* Populates entity_to_prof_map.
*/
rdc_status_t map_entity_to_profiler();
std::vector<rocprofiler_agent_v0_t> agents = {};
std::vector<std::shared_ptr<CounterSampler>> samplers = {};
std::map<rdc_field_t, const char*> field_to_metric = {};
std::map<uint32_t, uint32_t> smi_to_profiler_map = {};
std::map<uint32_t, uint32_t> entity_to_prof_map = {};
// these fields must be divided by time passed
std::unordered_set<rdc_field_t> eval_fields = {