SWDEV-457755 - Add TS only for kernel packets in the Accumulate command

Change-Id: I1b2f01c5763761808f49802fa117abc6306a22aa
This commit is contained in:
Satyanvesh Dittakavi authored and Maneesh Gupta committed 2024-05-28 06:28:17 +00:00
1 bovenliggende e705e5e0d9
commit 3d540ec113
3 files changed
+20 -9

No files matched your search

+12 -7
Bestand weergeven
@@ -158,7 +158,7 @@ void Timestamp::checkGpuTime() {
start = std::min(time.start, start);
end = std::max(time.end, end);
if (command().type() == CL_COMMAND_TASK) {
if ((command().type() == CL_COMMAND_TASK) && (it->isPacketDispatch_ == true)) {
static_cast<amd::AccumulateCommand&>(command()).addTimestamps(time.start, time.end);
}
@@ -868,12 +868,17 @@ bool VirtualGPU::dispatchGenericAqlPacket(
// Get active signal for current dispatch if profiling is necessary
packet->completion_signal = Barriers().ActiveSignal(kInitSignalValueOne, timestamp_);
// 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 &&
activity_prof::IsEnabled(OP_ID_DISPATCH)) {
auto dispatchPacket = reinterpret_cast<hsa_kernel_dispatch_packet_t*>(packet);
dispatchPacket->reserved2 = timestamp_->command().profilingInfo().correlation_id_;
if (std::is_same<decltype(packet), hsa_kernel_dispatch_packet_t*>::value) {
// 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 (activity_prof::IsEnabled(OP_ID_DISPATCH)) {
auto dispatchPacket = reinterpret_cast<hsa_kernel_dispatch_packet_t*>(packet);
dispatchPacket->reserved2 = timestamp_->command().profilingInfo().correlation_id_;
}
ProfilingSignal* current_signal = Barriers().GetLastSignal();
current_signal->isPacketDispatch_ = true;
}
}