From f05a33968f6337e654efe40388c125a19c085fc2 Mon Sep 17 00:00:00 2001 From: Ioannis Assiouras <38722728+iassiour@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:48:46 +0000 Subject: [PATCH] SWDEV-570500 - Fixed graph node to stream scheduling in multistream path (#2596) --- projects/clr/hipamd/src/hip_graph_internal.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/src/hip_graph_internal.cpp b/projects/clr/hipamd/src/hip_graph_internal.cpp index 59a62a499f..d127ea584f 100644 --- a/projects/clr/hipamd/src/hip_graph_internal.cpp +++ b/projects/clr/hipamd/src/hip_graph_internal.cpp @@ -202,10 +202,12 @@ void Graph::ScheduleOneNode(Node node, int stream_id) { reinterpret_cast(node)->GraphExec::TopologicalOrder(); } for (auto edge : node->GetEdges()) { - ScheduleOneNode(edge, stream_id); - // 1. Each extra edge will get a new stream from the pool - // 2. Streams will be reused if the number of edges > streams - stream_id = (stream_id + 1) % DEBUG_HIP_FORCE_GRAPH_QUEUES; + if (edge->stream_id_ == -1) { + ScheduleOneNode(edge, stream_id); + // 1. Each extra edge will get a new stream from the pool + // 2. Streams will be reused if the number of edges > streams + stream_id = (stream_id + 1) % DEBUG_HIP_FORCE_GRAPH_QUEUES; + } } } }