Repository navigation
[Tests][CI] gqa_decode and eager can fail; route workflow runs on pull requests - #431
Merged
Merged
Conversation
test_gqa_decode.py printed PASS or FAIL and exited 0 either way; it now compares through _pytorchsim_utils.test_result at the threshold it printed (atol 0.05, rtol 0). test_eager.py printed z and asserted nothing, though it is on the route allowlist; it now compares z with x + x * y on the CPU. Checked in the base image (topk-ptb:pts-base-92028c8), TORCHSIM_TIMING_MODE=0: - test_eager.py: real run rc=0 (Test Passed). Device result made wrong (z = x + z + x): parent rc=0 (prints 3s), this commit rc=1. Reference made wrong (+1): rc=1. - test_gqa_decode.py: real run rc=0 at the default (S 10240, T 4096, max diff 3.8e-05) and at S 1024 / T 512. Reference made wrong (+1): parent prints "FAIL (diff too large)" and exits 0, this commit exits 1. Refs #425
…ths the jobs run trigger it The Triton route workflow ran only on a push to pytorchsim-triton-backend, so an open pull request had no route check before it landed. It now also runs on pull_request into that branch, on the same path list (one YAML anchor): - base and route run only for a head in this repository: the runners are self-hosted, so a fork's code never runs on them; - bundle is skipped on pull_request (up to four hours on the shared runners); its propose step was already push-only. The paths filter missed files the jobs run or hash: tests/** (the sweep), device/** (the extension the route builds, and a PTS_INPUTS id of the bundle), docker/Dockerfile (the device build the route mirrors), third_party/github-releases.json (hashed into the base pin by third_party_base_pin.sh), scripts/ci/ghcr_manifest_code.sh (both registry checks), scripts/selection_merge.py (the bundle step). Checked: actionlint 1.7.12 clean on this file (runner labels declared); yaml.safe_load gives identical push and pull_request path lists; a glob dry-run of the trigger: a PR into the branch touching pytorchsim/** or tests/** fires (parent: no), a PR into master or touching only docs/ does not; a push touching tests/, device/, docker/Dockerfile, ghcr_manifest_code.sh, selection_merge.py or github-releases.json fires (parent: no). Refs #425
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.
Closes #425
Why
tests/ops/attention/test_gqa_decode.pyprintedPASS/FAILand exited 0 either way.tests/system/test_eager.pyprintedzand asserted nothing. It is on the route allowlist (scripts/ci/triton_route_passing.txt:278), so the allowlist counted it as passing whatever it computed..github/workflows/pytorchsim_triton_backend.ymlran only on a push topytorchsim-triton-backend, so a pull request had no route check before it landed. Itspathsfilter also left out files the jobs run or hash.What changed (before -> after)
tests/ops/attention/test_gqa_decode.py:8-9,202print PASS/FAIL, rc=0 alwaystest_result("GQADecodeOptimized", out_dev, out_cpu, rtol=0, atol=0.05). Same threshold as before; the only change is that exactly 0.05 now passes (<=instead of<). NaN still fails.tests/system/test_eager.py:6-7zzwithx_cpu + x_cpu * y_cputhroughtest_resulton:pushonlypush+pull_requestintopytorchsim-triton-backend, sharing one path list (&route_paths:24 /*route_paths:42)base(:69) /routeroutefollows throughneeds: base.bundle(:238)pull_request(it takes up to 4h on the shared runners). Its propose step was already push-only.device/**,tests/**,docker/Dockerfile,scripts/ci/ghcr_manifest_code.sh,scripts/selection_merge.py,third_party/github-releases.json(hashed byscripts/ci/third_party_base_pin.sh:7)Tests (before -> after)
Container image
topk-ptb:pts-base-92028c8,TORCHSIM_TIMING_MODE=0. Parent is069878a, branch ise205b81.tests/system/test_eager.pytest_eager.pyz = x + z + x)test_eager.py+ 1)tests/ops/attention/test_gqa_decode.pytest_gqa_decode.py --context_length 1024 --tile_size 512out_cpu + 1)Verification of the workflow change
yaml.safe_loadgives identicalpushandpull_requestpath lists.tests/**orpytorchsim/**now fires. On the parent, neither fired.master, or one touching onlydocs/, does not fire.triton-route-${{ github.ref }}, so each PR gets its own group (refs/pull/N/merge).inputs.sweep_jobsis empty, which thecaseat :199 accepts.SOURCE_SHAis the merge commit, the same commit checkout uses.Stacking / dependencies
origin/pytorchsim-triton-backendat069878a. Not stacked: [CI] An allowlisted route test that regresses fails the route job #421 and [Driver] The cache identity is the compiler's own toolchain and TOGSim API; a hit keeps its autotuned tile #423 are already merged into the branch.Open issues
.claude/CLAUDE.md:101still says the workflow "runs when the compiler pin itself moves", and the workflow header at :6 says the same. Both are now incomplete, because the workflow also runs on PRs into the branch..claude/CLAUDE.md:97callsdocker-image.yml"the PR gate", but that workflow has onlyworkflow_dispatch. That error predates this change. None of these lines were edited here.triton-route-coverageartifacts.scripts/ci/triton_route_previous.pyreads the newest one regardless of event, so a PR run can set the job order of the next push sweep. This affects ordering only, which that script already treats as best effort.previous_bundle.shreads push runs only.basehaspackages: write.docker/Dockerfile.basehas no COPY or ADD, so the tag is a hash of exactly what decides the image's contents. A PR therefore cannot overwrite a tag the branch uses with different contents.test_gqa_decode.pyis in neitherscripts/ci/triton_route_passing.txtnor thepytorchsim_test.ymlmatrix, so CI still does not run it.🤖 Generated with Claude Code
https://claude.ai/code/session_01UnJWSTNtd6944XAzy4bhk5