diff --git a/projects/clr/rocclr/device/pal/paltimestamp.cpp b/projects/clr/rocclr/device/pal/paltimestamp.cpp index ef091d3e24..e9726afcc1 100644 --- a/projects/clr/rocclr/device/pal/paltimestamp.cpp +++ b/projects/clr/rocclr/device/pal/paltimestamp.cpp @@ -17,7 +17,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - + #include "os/os.hpp" #include "platform/perfctr.hpp" #include "device/pal/paldefs.hpp" @@ -36,7 +36,7 @@ TimeStamp::~TimeStamp() {} void TimeStamp::begin() { 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; } @@ -44,7 +44,7 @@ void TimeStamp::begin() { void TimeStamp::end() { CondLog(!flags_.beginIssued_, "We didn't issue a begin operation!"); - gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeTop, *iMem_, + gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeBottom, *iMem_, memOffset_ + CommandEndTime * sizeof(uint64_t)); flags_.endIssued_ = true; } diff --git a/projects/clr/rocclr/device/pal/palvirtual.cpp b/projects/clr/rocclr/device/pal/palvirtual.cpp index 53dc7e52d7..43ef2c9333 100644 --- a/projects/clr/rocclr/device/pal/palvirtual.cpp +++ b/projects/clr/rocclr/device/pal/palvirtual.cpp @@ -588,9 +588,8 @@ void VirtualGPU::MemoryDependency::validate(VirtualGPU& gpu, const Memory* memor if (flushL1Cache) { // Flush cache - if (!gpu.profiling()) { - gpu.addBarrier(RgpSqqtBarrierReason::MemDependency); - } + gpu.addBarrier(RgpSqqtBarrierReason::MemDependency); + // Clear memory dependency state const static bool All = true; clear(!All); @@ -2514,13 +2513,7 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const // Run AQL dispatch in HW eventBegin(MainEngine); iCmd()->CmdDispatchAql(dispatchParam); - // Note: This a workaround for incorrect results reported with release_mem packet, - // when the packet can be processed later after this dispatch and including extra time - if (profiling() || state_.profileEnabled_) { - addBarrier(RgpSqqtBarrierReason::ProfilingControl); - // Clear memory dependency to avoid the second L1 invalidation - memoryDependency().clear(); - } + if (id != gpuEvent.id_) { LogError("Something is wrong. ID mismatch!\n"); }