SWDEV-272268, SWDEV-268186 - OCL change for Rebar optimization:fix regressions in OCLMemInfo and Conformance basic test

Change-Id: I3e709942b5f43ba52a4cb0824a2e6b3202d4b405


[ROCm/clr commit: f22ceb0fd8]
This commit is contained in:
Julia Jiang
2021-04-05 15:11:59 -04:00
zatwierdzone przez Julia Jiang
rodzic 77c260410a
commit 2f8170b85d
2 zmienionych plików z 8 dodań i 0 usunięć
@@ -106,6 +106,12 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
}
do {
// Assume that allocations will be placed into visible heap when ReBar is enabled
// Only enable this assumption for small size local buffers
constexpr size_t kLargeAlloc = (1ull << 27);
if ((memType == Local) && desc().buffer_ && (size() < kLargeAlloc) && dev().info().largeBar_) {
memType = Persistent;
}
// Create a resource in PAL
result = Resource::create(memType, params, forceLinear);
if (!result) {
@@ -1721,6 +1721,8 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand& vcmd) {
// data check was added for persistent memory that failed to get aperture
// and therefore are treated like a remote resource
else if (memory->isPersistentDirectMap() && (memory->data() != nullptr)) {
// Map/unmap must be serialized
amd::ScopedLock lock(owner->lockMemoryOps());
memory->unmap(this);
} else if (memory->mapMemory() != nullptr) {
if (writeMapInfo->isUnmapWrite()) {