From 514ee89cca71f6e629d7abcf4ff65a12d3d458d4 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 4 Feb 2026 12:17:17 +0000 Subject: [PATCH] Add deterministic debug logging to fused pipeline --- sexp_effects/primitive_libs/streaming_gpu.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sexp_effects/primitive_libs/streaming_gpu.py b/sexp_effects/primitive_libs/streaming_gpu.py index 2b37593..3e7b247 100644 --- a/sexp_effects/primitive_libs/streaming_gpu.py +++ b/sexp_effects/primitive_libs/streaming_gpu.py @@ -873,6 +873,8 @@ def _normalize_effect_dict(effect): return result +_FUSED_CALL_COUNT = 0 + def prim_fused_pipeline(img, effects_list, **dynamic_params): """ Apply a fused CUDA kernel pipeline to an image. @@ -894,6 +896,11 @@ def prim_fused_pipeline(img, effects_list, **dynamic_params): Supported ops: rotate, zoom, ripple, invert, hue_shift, brightness """ + global _FUSED_CALL_COUNT + _FUSED_CALL_COUNT += 1 + if _FUSED_CALL_COUNT <= 5 or _FUSED_CALL_COUNT % 100 == 0: + print(f"[FUSED] call #{_FUSED_CALL_COUNT}, effects={len(effects_list)}, params={list(dynamic_params.keys())}", file=sys.stderr) + # Normalize effects list - convert Keyword keys to strings effects_list = [_normalize_effect_dict(e) for e in effects_list]