Skip to content

Commit 32eb6a5

Browse files
SWDEV-530803 - User current device id while cloning graph node. (#313)
1 parent bddb8f1 commit 32eb6a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hipamd/src/hip_graph_internal.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,10 @@ bool Graph::TopologicalOrder(std::vector<Node>& TopoOrder) {
271271
// ================================================================================================
272272
void Graph::clone(Graph* newGraph, bool cloneNodes) const {
273273
newGraph->pOriginalGraph_ = this;
274+
auto curDevId = ihipGetDevice();
274275
for (hip::GraphNode* entry : vertices_) {
275276
GraphNode* node = entry->clone();
277+
node->SetDeviceId(curDevId);
276278
node->SetParentGraph(newGraph);
277279
newGraph->vertices_.push_back(node);
278280
newGraph->clonedNodes_[entry] = node;

0 commit comments

Comments
 (0)