[PAL] Force large buffer mappings to use pinned memory

PAL doesn't perform chunking for system memory allocations, hence we
should fall back to using pinned memory for mapping large buffers.

Change-Id: I1b472616b72d12ed0105fb65532acacdb98ac7b3
Αυτή η υποβολή περιλαμβάνεται σε:
Vladislav Sytchenko
2020-11-11 10:20:12 -05:00
γονέας 089a5cc4ad
υποβολή b4e212a0f9
@@ -747,7 +747,8 @@ void* Memory::allocMapTarget(const amd::Coord3D& origin, const amd::Coord3D& reg
owner()->commitSvmMemory();
}
if (owner()->numDevices() > 1) {
constexpr size_t largeAlloc = (1ull << 31);
if ((owner()->numDevices() > 1) || (owner()->getSize() > largeAlloc)) {
if ((nullptr == initHostPtr) && (owner()->getHostMem() == nullptr)) {
static const bool forceAllocHostMem = true;
if (!owner()->allocHostMemory(nullptr, forceAllocHostMem)) {