Before, the GPU IDs were counted starting from zero, now CPU IDs are counted from zero and then GPU IDs from the last CPU_ID+1

Change-Id: I3f815195ad97933e02f249841e53b64b674370d9


[ROCm/rocprofiler commit: 6dda141e4b]
This commit is contained in:
Ammar ELWazir
2022-12-02 11:16:45 -06:00
szülő d72dca799b
commit f7772fb704
@@ -415,12 +415,12 @@ uint32_t HsaRsrcFactory::GetCountOfCpuAgents() { return uint32_t(cpu_list_.size(
bool HsaRsrcFactory::GetGpuAgentInfo(uint32_t idx, const AgentInfo** agent_info) {
// Determine if request is valid
uint32_t size = uint32_t(gpu_list_.size());
if (idx >= size) {
if (idx-cpu_list_.size() >= size) {
return false;
}
// Copy AgentInfo from specified index
*agent_info = gpu_list_[idx];
*agent_info = gpu_list_[idx-cpu_list_.size()];
return true;
}