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
[ROCm/clr commit: eef47ca24a]
This commit is contained in:
1 parent
1087f13ee1
commit
9c811dc241
13 files changed
+352
-39
No files matched your search
@@ -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