SWDEV-467069 - Added safety check in activity prof for accumulate command

Adding a safety check prevents an invalid memory access
if timestamps and kernelNames vectors are of different size.

The patch also moves the addKernelNames for the accumulate command
into dispatchAqlPacket function.

Change-Id: Iea0927e1253800403a1ae3f3d72de1e7d96476c3
This commit is contained in:
Ioannis Assiouras
2024-06-11 19:22:19 +01:00
parent 3edf1501cc
commit d44f44a5b1
6 ha cambiato i file con 29 aggiunte e 18 eliminazioni
+3 -2
Vedi File
@@ -594,8 +594,9 @@ hipError_t EnqueueGraphWithSingleList(std::vector<hip::Node>& topoOrder, hip::St
if (DEBUG_CLR_GRAPH_PACKET_CAPTURE && topoOrder[i]->GetType() == hipGraphNodeTypeKernel &&
!reinterpret_cast<hip::GraphKernelNode*>(topoOrder[i])->HasHiddenHeap()) {
if (topoOrder[i]->GetEnabled()) {
hip_stream->vdev()->dispatchAqlPacket(topoOrder[i]->GetAqlPacket(), accumulate);
accumulate->addKernelName(topoOrder[i]->GetKernelName());
hip_stream->vdev()->dispatchAqlPacket(topoOrder[i]->GetAqlPacket(),
topoOrder[i]->GetKernelName(),
accumulate);
}
} else {
topoOrder[i]->SetStream(hip_stream, graphExec);