SWDEV-353281 - Initial support of memalloc in graph
Add memory allocation support in graph. Current implementation uses cache from mempool to hold the allocations which belong to the graph. Also the resource tracking is disabled at this moment because mempool operates with hip::Stream objects, but graph has execution with amd::HostQueue objects. Change-Id: I54fe3250126d24f5a26ada975f37d429bb4ef17b
This commit is contained in:
@@ -108,7 +108,10 @@ hipError_t ihipFree(void *ptr) {
|
||||
queue->finish();
|
||||
}
|
||||
hip::Stream::syncNonBlockingStreams(device_id);
|
||||
amd::SvmBuffer::free(memory_object->getContext(), ptr);
|
||||
// Find out if memory belongs to any memory pool
|
||||
if (!g_devices[device_id]->FreeMemory(memory_object, nullptr)) {
|
||||
amd::SvmBuffer::free(memory_object->getContext(), ptr);
|
||||
}
|
||||
return hipSuccess;
|
||||
}
|
||||
return hipErrorInvalidValue;
|
||||
|
||||
Reference in New Issue
Block a user