Add env key to disable 2MB suballocation.

Change-Id: Icca3041c3578aa180a656c01aae62f2ad6e8b583


[ROCm/ROCR-Runtime commit: 4275661682]
This commit is contained in:
Sean Keely
2017-09-13 06:35:05 -05:00
parent 9fd778eec1
commit 3aeea948cb
2 changed files with 10 additions and 3 deletions
@@ -171,7 +171,8 @@ hsa_status_t MemoryRegion::Allocate(size_t size, AllocateFlags alloc_flags,
(alloc_flags & AllocateDoubleMap ? 1 : 0);
// Only allow using the suballocator for ordinary VRAM.
bool useSubAlloc = IsLocalMemory();
bool useSubAlloc = !core::Runtime::runtime_singleton_->flag().disable_fragment_alloc();
useSubAlloc &= IsLocalMemory();
useSubAlloc &= (alloc_flags == AllocateRestrict);
useSubAlloc &= (size <= fragment_allocator_.max_alloc());
if (useSubAlloc) {