SWDEV-292408 - Keep tracking of subbuffers for multiple devices

Change-Id: I568b5ea79614ef507cf1f0efb3dca38ab6cc2db7


[ROCm/clr commit: 6b47e50350]
这个提交包含在:
German Andryeyev
2021-09-22 10:57:20 -04:00
父节点 604a489c4b
当前提交 42ae43ee24
+5 -6
查看文件
@@ -457,12 +457,11 @@ bool Memory::setDestructorCallback(DestructorCallBackFunction callback, void* da
}
void Memory::signalWrite(const Device* writer) {
// 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;
// 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())) {
// Update all subbuffers for this object
for (auto buf : subBuffers_) {
buf->signalWrite(writer);