From a19f14eadeabaf33d3bc5718f7ec80b43e8aa846 Mon Sep 17 00:00:00 2001 From: Giulio Starace Date: Tue, 28 Apr 2026 16:22:46 +0200 Subject: [PATCH] Tighten C++ UNSYNC_MULTISTREAM threshold: flag when sync calls < stream creates --- kernelguard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernelguard.py b/kernelguard.py index f086847..cc5c4fa 100644 --- a/kernelguard.py +++ b/kernelguard.py @@ -1321,7 +1321,8 @@ def detect_unsync_multistream(code: str | SubmissionFacts) -> list[dict]: "high", f"C++: {cpp_stream_creates} getStreamFromPool calls, no sync/wait primitives", )) - elif cpp_sync_calls * 2 < cpp_stream_creates: + elif cpp_sync_calls < cpp_stream_creates: + # Under-synchronized: fewer sync/wait calls than stream creates (C++) candidates.append(( "medium", f"C++: {cpp_stream_creates} getStreamFromPool calls, only {cpp_sync_calls} sync/wait calls",