SWDEV-422207 - Report kernel names for activity profiling

- Report kernel names for optimized graph path
- Refactor code so that we store profiling info in Accumulate command

Change-Id: Ib97735a0239aeb9fc3a50a4bb7126dd0bcadc8af


[ROCm/clr commit: b056686607]
此提交包含在:
Saleel Kudchadker
2023-11-15 04:27:56 +00:00
父節點 153bb15f46
當前提交 cb9a715e04
共有 5 個檔案被更改,包括 55 行新增 和 21 行删除
+6 -2
查看文件
@@ -101,10 +101,14 @@ void ReportActivity(const amd::Command& command) {
break;
}
if (command.profilingInfo().tsList_.size() > 0) {
for (auto& it : command.profilingInfo().tsList_) {
if (command.type() == CL_COMMAND_TASK) {
auto timestamps = static_cast<const amd::AccumulateCommand&>(command).getTimestamps();
for (uint32_t i = 0; i < timestamps.size(); i++) {
auto it = timestamps[i];
record.begin_ns = it.first;
record.end_ns = it.second;
record.kernel_name =
static_cast<const amd::AccumulateCommand&>(command).getKernelNames()[i].c_str();
function(ACTIVITY_DOMAIN_HIP_OPS, operation_id, &record);
}
} else {