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]
This commit is contained in:
Saleel Kudchadker
2023-11-15 04:27:56 +00:00
parent 153bb15f46
commit cb9a715e04
5 changed files with 55 additions and 21 deletions
+6 -2
View File
@@ -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 {