From 7b6e59cbea4d54830f81a0a4706b5e8e1f16b5ce 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) [ROCm/clr commit: 32eb6a5d8955b24b5a5b22d134a1144e99138c28] --- projects/clr/hipamd/src/hip_graph_internal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/clr/hipamd/src/hip_graph_internal.cpp b/projects/clr/hipamd/src/hip_graph_internal.cpp index 4839b18af3..20f60a4c3f 100644 --- a/projects/clr/hipamd/src/hip_graph_internal.cpp +++ b/projects/clr/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;