Add deterministic debug logging to fused pipeline
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user