From e5816ea0488ec668b44f8ac9a7589e72c342c439 Mon Sep 17 00:00:00 2001 From: Alex Xie Date: Thu, 14 Oct 2021 21:01:31 -0400 Subject: [PATCH] SWDEV-306854 - Observed conformance subtest SVM failure Revert "SWDEV-292408 - Keep tracking of subbuffers for multiple devices" Change-Id: I604e9b49368fa1f143302fddda674c18d7351108 [ROCm/clr commit: ea48fc029bd90235750ba550ab67d145bc74d5d4] --- projects/clr/rocclr/platform/memory.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/clr/rocclr/platform/memory.cpp b/projects/clr/rocclr/platform/memory.cpp index 737bffa0c4..5a42a435ed 100644 --- a/projects/clr/rocclr/platform/memory.cpp +++ b/projects/clr/rocclr/platform/memory.cpp @@ -457,11 +457,12 @@ bool Memory::setDestructorCallback(DestructorCallBackFunction callback, void* da } void Memory::signalWrite(const Device* writer) { - // The potential race condition below doesn't matter, no critical section needed - ++version_; - lastWriter_ = writer; - // Keep subbuffers tracking only for multiple devices and it's not system memory - if ((numDevices() > 1) && (nullptr == getHostMem())) { + // Disable cache coherency layer for HIP + if (!amd::IS_HIP) { + // (the potential race condition below doesn't matter, no critical + // section needed) + ++version_; + lastWriter_ = writer; // Update all subbuffers for this object for (auto buf : subBuffers_) { buf->signalWrite(writer);