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:
German Andryeyev committed 2023-01-13 13:06:59 -05:00
1 parent 1087f13ee1
commit 9c811dc241
13 files changed
+352 -39

No files matched your search

@@ -636,13 +636,8 @@ void ihipGraph::LevelOrder(std::vector<Node>& levelOrder) {
}
}
const ihipGraph* ihipGraph::getOriginalGraph() const { return pOriginalGraph_; }
void ihipGraph::setOriginalGraph(const ihipGraph* pOriginalGraph) {
pOriginalGraph_ = pOriginalGraph;
}
ihipGraph* ihipGraph::clone(std::unordered_map<Node, Node>& clonedNodes) const {
ihipGraph* newGraph = new ihipGraph();
ihipGraph* newGraph = new ihipGraph(device_, this);
for (auto entry : vertices_) {
hipGraphNode* node = entry->clone();
node->SetParentGraph(newGraph);
@@ -668,7 +663,6 @@ ihipGraph* ihipGraph::clone(std::unordered_map<Node, Node>& clonedNodes) const {
}
clonedNodes[node]->SetDependencies(clonedDependencies);
}
newGraph->setOriginalGraph(this);
return newGraph;
}