From 32eb6a5d8955b24b5a5b22d134a1144e99138c28 Mon Sep 17 00:00:00 2001 From: "Patel, Jaydeepkumar" Date: Wed, 14 May 2025 20:36:15 -0700 Subject: [PATCH] SWDEV-530803 - User current device id while cloning graph node. (#313) --- hipamd/src/hip_graph_internal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hipamd/src/hip_graph_internal.cpp b/hipamd/src/hip_graph_internal.cpp index 4839b18af3..20f60a4c3f 100644 --- a/hipamd/src/hip_graph_internal.cpp +++ b/hipamd/src/hip_graph_internal.cpp @@ -271,8 +271,10 @@ bool Graph::TopologicalOrder(std::vector& TopoOrder) { // ================================================================================================ void Graph::clone(Graph* newGraph, bool cloneNodes) const { newGraph->pOriginalGraph_ = this; + auto curDevId = ihipGetDevice(); for (hip::GraphNode* entry : vertices_) { GraphNode* node = entry->clone(); + node->SetDeviceId(curDevId); node->SetParentGraph(newGraph); newGraph->vertices_.push_back(node); newGraph->clonedNodes_[entry] = node;