device id/type for submit callback
Change-Id: I69b31bd28850198c8ca44e55bf8f2ff9540d92fc
[ROCm/rocprofiler commit: 3d4c4d1cce]
This commit is contained in:
@@ -496,6 +496,8 @@ struct rocprofiler_hsa_callback_data_t {
|
||||
const void* packet; // submitted to GPU packet
|
||||
const char* kernel_name; // kernel name, not NULL if dispatch
|
||||
hsa_queue_t* queue; // HSA queue the kernel was submitted to
|
||||
uint32_t device_type; // type of device the packed is submitted to
|
||||
uint32_t device_id; // id of device the packed is submitted to
|
||||
} submit;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -139,6 +139,8 @@ class InterceptQueue {
|
||||
data.submit.kernel_name =
|
||||
(GetHeaderType(packet) == HSA_PACKET_TYPE_KERNEL_DISPATCH) ? GetKernelName(dispatch_packet) : NULL;
|
||||
data.submit.queue = obj->queue_;
|
||||
data.submit.device_type = obj->agent_info_->dev_type;
|
||||
data.submit.device_id = obj->agent_info_->dev_index;
|
||||
submit_callback_fun_(ROCPROFILER_HSA_CB_ID_SUBMIT, &data, submit_callback_arg_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -859,6 +859,8 @@ hsa_status_t hsa_unified_callback(
|
||||
printf(" packet %p\n", data->submit.packet);
|
||||
if (data->submit.kernel_name != NULL) {
|
||||
printf(" submit kernel \"%s\"\n", data->submit.kernel_name);
|
||||
printf(" device type = %u\n", data->submit.device_type);
|
||||
printf(" device id = %u\n", data->submit.device_id);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user