adding agent to device callback data
Change-Id: I7d631e4faae685ce23704ac65308bf2aae0c157a
This commit is contained in:
@@ -484,6 +484,7 @@ struct rocprofiler_hsa_callback_data_t {
|
||||
struct {
|
||||
hsa_device_type_t type; // type of assigned device
|
||||
uint32_t id; // id of assigned device
|
||||
hsa_agent_t agent; // device HSA agent handle
|
||||
const void* ptr; // ptr the device is assigned to
|
||||
} device;
|
||||
struct {
|
||||
|
||||
@@ -169,6 +169,7 @@ class HsaInterceptor {
|
||||
hsa_agent_t agent = *agent_p;
|
||||
rocprofiler_hsa_callback_data_t data{};
|
||||
data.device.id = util::HsaRsrcFactory::Instance().GetAgentInfo(agent)->dev_index;
|
||||
data.device.agent = agent;
|
||||
data.device.ptr = ptr;
|
||||
|
||||
HSA_RT(hsa_agent_get_info(agent, HSA_AGENT_INFO_DEVICE, &data.device.type));
|
||||
|
||||
@@ -847,6 +847,7 @@ hsa_status_t hsa_unified_callback(
|
||||
case ROCPROFILER_HSA_CB_ID_DEVICE:
|
||||
printf(" device type = 0x%x\n", data->device.type);
|
||||
printf(" device id = %u\n", data->device.id);
|
||||
printf(" device agent = 0x%lx\n", data->device.agent.handle);
|
||||
printf(" assigned ptr = %p\n", data->device.ptr);
|
||||
break;
|
||||
case ROCPROFILER_HSA_CB_ID_MEMCOPY:
|
||||
|
||||
مرجع در شماره جدید
Block a user