PLAT-130886: Support for MI300 XCC modes for rocprofv2
1. Accumulated mode(default mode) will aggregate counters and metric values from all xcc.
2. Individual mode (export ROCPROFILER_INDIVIDUAL_XCC_MODE=1) will dump metrics from each xcc separately.
Change-Id: I18ca334514f626f0c8e92d1472c1738978baccd4
[ROCm/rocprofiler commit: 58c4b165fe]
This commit is contained in:
committed by
Ammar ELWazir
parent
d9afb4322f
commit
7e912d3a61
@@ -84,6 +84,14 @@ AgentInfo::AgentInfo(const hsa_agent_t agent, ::CoreApiTable* table) : handle_(a
|
||||
{
|
||||
rocmtools::fatal("hsa_agent_get_info for PCI info failed");
|
||||
}
|
||||
|
||||
// TODO: (sauverma) use hsa_agent_get_info_fn(HSA_AMD_AGENT_INFO_NUM_XCC)
|
||||
// to get xcc_num once hsa headers are updated from rocr/hsa
|
||||
std::string gpu_name = std::string(name_).substr(0,6);
|
||||
if (gpu_name == "gfx940")
|
||||
xcc_num_ = 6;
|
||||
else
|
||||
xcc_num_ = 1;
|
||||
}
|
||||
|
||||
int AgentInfo::getIndex() const { return index_; }
|
||||
@@ -102,6 +110,7 @@ uint32_t AgentInfo::getCUCountPerSH() const { return compute_units_per_sh_; }
|
||||
uint32_t AgentInfo::getWaveSlotsPerSimd() const { return wave_slots_per_simd_; }
|
||||
uint32_t AgentInfo::getPCIDomain() const { return pci_domain_; }
|
||||
uint32_t AgentInfo::getPCILocationID() const { return pci_location_id_; }
|
||||
uint32_t AgentInfo::getXccCount() const { return xcc_num_; }
|
||||
|
||||
void AgentInfo::setIndex(int index) { index_ = index; }
|
||||
void AgentInfo::setType(hsa_device_type_t type) { type_ = type; }
|
||||
|
||||
@@ -59,6 +59,7 @@ class AgentInfo {
|
||||
uint32_t getWaveSlotsPerSimd() const;
|
||||
uint32_t getPCIDomain() const;
|
||||
uint32_t getPCILocationID() const;
|
||||
uint32_t getXccCount() const;
|
||||
|
||||
void setIndex(int index);
|
||||
void setType(hsa_device_type_t type);
|
||||
@@ -81,6 +82,8 @@ class AgentInfo {
|
||||
// CUs per SH/SA
|
||||
uint32_t compute_units_per_sh_;
|
||||
uint32_t wave_slots_per_simd_;
|
||||
// Number of XCCs on the GPU
|
||||
uint32_t xcc_num_;
|
||||
|
||||
uint32_t pci_domain_;
|
||||
uint32_t pci_location_id_;
|
||||
|
||||
Reference in New Issue
Block a user