From 4c7afea115cee561fcccd412a21b544830144f12 Mon Sep 17 00:00:00 2001 From: Bertan Dogancay <111835151+BertanDogancay@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:19:32 -0400 Subject: [PATCH] [Tools/Replayer] Fix prohibited calls during capture mode (#1938) [ROCm/rccl commit: b703ffdfa4f565e85c4c11308c53b8963e203055] --- projects/rccl/tools/RcclReplayer/rcclReplayer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/rccl/tools/RcclReplayer/rcclReplayer.cpp b/projects/rccl/tools/RcclReplayer/rcclReplayer.cpp index 40d7f788e4..33b85adc9e 100644 --- a/projects/rccl/tools/RcclReplayer/rcclReplayer.cpp +++ b/projects/rccl/tools/RcclReplayer/rcclReplayer.cpp @@ -270,7 +270,7 @@ void Replayer::replay() graphLife[call.graphID].counter--; if (graphLife[call.graphID].starts.contains(lineNum)) { - HIP_CALL(hipStreamBeginCapture(streams[call.stream].first, hipStreamCaptureModeGlobal)); + HIP_CALL(hipStreamBeginCapture(streams[call.stream].first, hipStreamCaptureModeRelaxed)); printf("[INFO ] Rank %d - Line %d : starting capture graph %llu\n", myRank, lineNum, call.graphID); } else if (graphLife[call.graphID].stream != call.stream) { printf("[WARNING ] \x1b[31mRank %d - Line %d : multi-stream graph may not replay original dependency accurately\x1b[0m\n", myRank, lineNum); @@ -560,7 +560,9 @@ cleanup: } if (call.stream && lineNum == streams[call.stream].second) { - HIP_CALL(hipStreamSynchronize(streams[call.stream].first)); // ? + if (call.graphCaptured != 1) { + HIP_CALL(hipStreamSynchronize(streams[call.stream].first)); // ? + } HIP_CALL(hipStreamDestroy(streams[call.stream].first)); } lineNum++; // change for a2av