This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Reproducible transform for: unify cuda-graph capture/replay across 3 attention backends | |
| Run from the repo root: python3 /tmp/transform_attn_capture_replay.py | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.append(".claude/skills/mechanical-refactor-verify") | |
| from mechanical_refactor_verify_utils import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Reproducible transform for: unify cuda-graph capture/replay across attention backends | |
| Covers: | |
| - cutlass_mla_backend: delegate capture to replay; remove stale assert + blank line in replay | |
| - flashinfer_mla_backend: merge identical is_target_verify / is_draft_extend branches | |
| - wave_backend: extract _build_cuda_graph_forward_metadata; delegate capture to replay; | |
| remove three stale comments in replay | |
| - flashinfer_backend: extract _create_decode_wrappers / _create_prefill_wrappers / | |
| _prepare_cuda_graph_metadata; collapse capture to prepare + replay; merge |