SWDEV-353281 - Change pool type for graphs
Under ROCr physical allocations don't have initial VA and require extra flag in ROCclr. Add an option to have a mempool of physical allocations. Change-Id: I4d062fe0dd8113d4eaf6e8b51749ed56d8701d1e
Этот коммит содержится в:
коммит произвёл
Julia Jiang
родитель
51926b6b6b
Коммит
f296159f62
@@ -180,6 +180,7 @@ void* MemoryPool::AllocateMemory(size_t size, Stream* stream, void* dptr) {
|
||||
return nullptr;
|
||||
}
|
||||
cl_svm_mem_flags flags = (state_.interprocess_) ? ROCCLR_MEM_INTERPROCESS : 0;
|
||||
flags |= (state_.phys_mem_) ? ROCCLR_MEM_PHYMEM : 0;
|
||||
dev_ptr = amd::SvmBuffer::malloc(*context, flags, size, dev_info.memBaseAddrAlign_, nullptr);
|
||||
if (dev_ptr == nullptr) {
|
||||
size_t free = 0, total =0;
|
||||
@@ -291,7 +292,7 @@ bool MemoryPool::FreeMemory(amd::Memory* memory, Stream* stream, Event* event) {
|
||||
|
||||
// Decrement the reference counter on the pool.
|
||||
// Note: It may delete memory pool for the last allocation. Thus, the scope lock can't include
|
||||
// this call.
|
||||
// this call.
|
||||
release();
|
||||
|
||||
return true;
|
||||
|
||||
Ссылка в новой задаче
Block a user