From f4f65e006557c1f4a6b33a903e96b65fd983dee6 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 16 Feb 2026 08:47:11 +0100 Subject: feat(sequence): Clean up compiler and add test accessor - Remove debug output from seq_compiler_v2.py - Add get_effect_dag() accessor for testing - Add e2e test skeleton (shader compatibility pending) handoff(Claude): v2 foundation complete, 3 phases done --- tools/seq_compiler_v2.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tools') diff --git a/tools/seq_compiler_v2.py b/tools/seq_compiler_v2.py index 56bf613..6ae6283 100755 --- a/tools/seq_compiler_v2.py +++ b/tools/seq_compiler_v2.py @@ -332,8 +332,6 @@ def detect_ping_pong(seq: SequenceDecl, sorted_effects: List[EffectDecl]) -> Dic eff1 = sorted_effects[i] eff2 = sorted_effects[i + 1] - print(f"DEBUG: Checking pair {i}: {eff1.class_name}({eff1.inputs}->{eff1.outputs}) and {eff2.class_name}({eff2.inputs}->{eff2.outputs})", file=sys.stderr) - # Find nodes that alternate for out1 in eff1.outputs: if out1 in ['source', 'sink'] or out1 in used_nodes: @@ -343,32 +341,24 @@ def detect_ping_pong(seq: SequenceDecl, sorted_effects: List[EffectDecl]) -> Dic if in1 in ['source', 'sink'] or in1 in used_nodes: continue - print(f"DEBUG: Testing out1={out1}, in1={in1}: in1 in eff2.outputs={in1 in eff2.outputs}, out1 in eff2.inputs={out1 in eff2.inputs}", file=sys.stderr) - # Check if eff2 writes in1 and reads out1 (alternating) if in1 in eff2.outputs and out1 in eff2.inputs: # Classic ping-pong: eff1 (reads in1, writes out1), eff2 (reads out1, writes in1) - print(f"DEBUG: Found potential ping-pong: {in1} <-> {out1} between {eff1.class_name} and {eff2.class_name}", file=sys.stderr) - # Check no other effects use these nodes other_uses = False for j, eff in enumerate(sorted_effects): if j == i or j == i + 1: continue if out1 in eff.inputs + eff.outputs or in1 in eff.inputs + eff.outputs: - print(f"DEBUG: Other effect {eff.class_name} uses {out1 if out1 in eff.inputs + eff.outputs else in1}", file=sys.stderr) other_uses = True break if not other_uses: - print(f"DEBUG: Aliasing {in1} -> {out1}", file=sys.stderr) # Alias in1 -> out1 (in1 uses same texture as out1) aliases[in1] = out1 used_nodes.add(out1) used_nodes.add(in1) break - else: - print(f"DEBUG: Skipping alias due to other uses", file=sys.stderr) return aliases -- cgit v1.2.3