Record LavaSR torch.compile measurements - #67
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds recorded evidence around a Colab T4 torch.compile experiment for LavaSR and documents the resulting decision to keep torch-eager as the only selectable runtime provider.
Changes:
- Add a Colab-only benchmark script that measures eager vs
torch.compilelatency, peak CUDA allocation, determinism, and numerical drift. - Document the T4 measurement results and the evidence-based decision not to expose
torch-compileas a provider. - Minor formatting tweak in a LavaSR compatibility test.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_lavasr_compat.py | Reformats a monkeypatch call for readability. |
| ROADMAP.md | Marks the “Optimize Only After Measurement” priority as completed and records the compile findings. |
| examples/colab_lavasr_compile_benchmark.py | Adds a Colab T4 benchmark runner that records eager vs torch.compile evidence. |
| docs/ACCELERATORS.md | Updates accelerator guidance with the compile trial results and reproduction steps. |
| CHANGELOG.md | Notes the addition of the compile benchmark and the decision to keep eager as the only provider. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+16
to
+18
| REPO_URL = os.environ.get("ASR_REPO_URL", "https://github.com/Tinnci/python-audio-super-resolution.git") | ||
| GIT_REF = os.environ.get("ASR_GIT_REF", "agent/lavasr-torch-compile-evidence") | ||
| WORK_ROOT = Path(os.environ.get("ASR_COLAB_WORK_ROOT", "/content/lavasr-compile-benchmark")) |
Comment on lines
+49
to
+51
| torch.manual_seed(0) | ||
| torch.cuda.empty_cache() | ||
| torch.cuda.reset_peak_memory_stats() |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
torch.compilebenchmarktorch-eageras the only selectable provider based on measured evidenceColab evidence
Two fresh Tesla T4 sessions, torch
2.11.0+cu128, identical one-second fixture:0.96xand1.82x2.3-2.4 s34-35 s72,180,224vs80,844,288bytes5.2e-8to6.1e-8Decision: no public
torch-compileprovider. Require repeatable representative-length benefit before reopening. All real-weight, compile, GPU, and audio computation ran through Colab CLI.Local verification
git diff --checkpixi run lintpixi run format-checkpixi run typecheckpixi run test(163 passed, 6 skipped)