SWDEV-301667 - Reset profiler correlation_id_

- The correlation_id had random junk values which we were inserting in
the dispatch AQL packet even when no profiler was attached but if we had
a valid timestamp.
- Also make sure we dont even write the reserved2 field in the AQL
packet if no profiler attached.

Change-Id: Icdb7493198c1bb5e2d786a97e027288660854cd7


[ROCm/clr commit: 9a6ddae7b2]
Bu işleme şunda yer alıyor:
Saleel Kudchadker
2024-01-25 02:10:15 +00:00
işlemeyi yapan: Maneesh Gupta
ebeveyn 3445b57a43
işleme cc0b04cc60
3 değiştirilmiş dosya ile 6 ekleme ve 2 silme
+2 -1
Dosyayı Görüntüle
@@ -865,7 +865,8 @@ bool VirtualGPU::dispatchGenericAqlPacket(
// If profiling is enabled, store the correlation ID in the dispatch packet. The profiler can
// retrieve this correlation ID to attribute waves to specific dispatch locations.
if (std::is_same<decltype(packet), hsa_kernel_dispatch_packet_t*>::value) {
if (std::is_same<decltype(packet), hsa_kernel_dispatch_packet_t*>::value &&
activity_prof::IsEnabled(OP_ID_DISPATCH)) {
auto dispatchPacket = reinterpret_cast<hsa_kernel_dispatch_packet_t*>(packet);
dispatchPacket->reserved2 = timestamp_->command().profilingInfo().correlation_id_;
}