[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
[ROCm/clr commit: b4e212a0f9]
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user