From 543cc3223a2f1a8f78ddc58acd6a856f6bab72ee Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 4 Aug 2017 16:48:42 -0400
Subject: [PATCH] P4 to Git Change 1443821 by asalmanp@asalmanp-ocl-stg on
2017/08/04 16:24:19
SWDEV-79278 - [OCL][PAL] use HwPipeBottom to query the start time of an event.
The reason is that if there are many dispatches run in a loop with profiling enabled, then it is possible that the HwPipeStart of an event can occur before the HwPipeBottom of the previous dispatch and this will affect the timing reported by profiling.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/13242/diff/1/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.cpp#3 edit
---
rocclr/runtime/device/pal/paltimestamp.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/pal/paltimestamp.cpp b/rocclr/runtime/device/pal/paltimestamp.cpp
index c46fe3ec97..57395164b5 100644
--- a/rocclr/runtime/device/pal/paltimestamp.cpp
+++ b/rocclr/runtime/device/pal/paltimestamp.cpp
@@ -19,7 +19,7 @@ TimeStamp::~TimeStamp() {}
void TimeStamp::begin(bool sdma) {
if (!flags_.beginIssued_) {
- gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeTop, *iMem_,
+ gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeBottom, *iMem_,
memOffset_ + CommandStartTime * sizeof(uint64_t));
flags_.beginIssued_ = true;
}