From 34fd1b7fe55918b4e8e477869012e866e19205de Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Fri, 12 Jan 2024 23:42:09 +0000 Subject: [PATCH] SWDEV-301667 - Remove resetFenceDirty Dont track the status of fence_dirty_ flag on the host, instead clear it when we submit a barrier on the respective stream. Change-Id: I4d98dbf20c81379c9c5da9f5b67629a8f9f6dfcd [ROCm/clr commit: 0b0df605d4f70be33009b0c45a05280a283e1c07] --- projects/clr/hipamd/src/hip_stream.cpp | 9 --------- projects/clr/rocclr/device/device.hpp | 3 --- projects/clr/rocclr/device/rocm/rocvirtual.hpp | 1 - 3 files changed, 13 deletions(-) diff --git a/projects/clr/hipamd/src/hip_stream.cpp b/projects/clr/hipamd/src/hip_stream.cpp index e8e286bfb6..e0395ba9e7 100644 --- a/projects/clr/hipamd/src/hip_stream.cpp +++ b/projects/clr/hipamd/src/hip_stream.cpp @@ -254,15 +254,6 @@ void iHipWaitActiveStreams(hip::Stream* blocking_stream, bool wait_null_stream) command->enqueue(); command->release(); } - - //Reset the dirty flag for all streams now that the marker is submitted - amd::ScopedLock lock(streamSetLock); - for (const auto& stream : streamSet) { - amd::HostQueue* active_queue = stream->asHostQueue(); - if (active_queue->vdev()->isFenceDirty()) { - active_queue->vdev()->resetFenceDirty(); - } - } } // Release all active commands. It's safe after the marker was enqueued diff --git a/projects/clr/rocclr/device/device.hpp b/projects/clr/rocclr/device/device.hpp index a85867047b..d00dfb4f6c 100644 --- a/projects/clr/rocclr/device/device.hpp +++ b/projects/clr/rocclr/device/device.hpp @@ -1296,9 +1296,6 @@ class VirtualDevice : public amd::HeapObject { //! Dispatch captured AQL packet virtual bool dispatchAqlPacket(uint8_t* aqlpacket, amd::AccumulateCommand* vcmd = nullptr) = 0; - //! Resets fence state of the VirtualGPU - virtual void resetFenceDirty() = 0; - private: //! Disable default copy constructor VirtualDevice& operator=(const VirtualDevice&); diff --git a/projects/clr/rocclr/device/rocm/rocvirtual.hpp b/projects/clr/rocclr/device/rocm/rocvirtual.hpp index 609715934d..25a5715642 100644 --- a/projects/clr/rocclr/device/rocm/rocvirtual.hpp +++ b/projects/clr/rocclr/device/rocm/rocvirtual.hpp @@ -419,7 +419,6 @@ class VirtualGPU : public device::VirtualDevice { void* allocKernArg(size_t size, size_t alignment); bool isFenceDirty() const { return fence_dirty_; } - void resetFenceDirty() { fence_dirty_ = false; } void setLastUsedSdmaEngine(uint32_t mask) { lastUsedSdmaEngineMask_ = mask; } uint32_t getLastUsedSdmaEngine() const { return lastUsedSdmaEngineMask_.load(); } // } roc OpenCL integration