…ine (#7303)
* review-pr: publish the card as a PR review with findings anchored inline
Today the bot posts card.md as one top-level issue comment. Across the 61
real cards it has published on this repo, those carry 229 findings; 120 of
them (52%) cite a `file:line`, and 65 of those lines are inside the PR's own
diff. Those are findings a reader would rather meet next to the code than
half-way down a wall of prose.
_publish.py now POSTs `/pulls/{pr}/reviews` with `event: "COMMENT"` -- never
APPROVE or REQUEST_CHANGES, this bot stays advisory and gates nothing. The
findings whose citation checks out and lands in the diff go up as `comments[]`
on their lines; everything else stays in the review body, together with a
one-line index of the ones that went inline. The index is not decoration:
without it a reader of the summary cannot tell whether findings exist
elsewhere or none do, and an invisible finding reads exactly like a finding
that was never made.
Anchoring is a privilege a finding earns. check_citations.py (ported from
ATOM, where it was built) is now wired in as run_one.sh step 3c: it writes
citations.txt, _lib.py collects it, and _publish.py refuses to anchor any
finding carrying a citation the checker flagged -- a top-level card that
cites a wrong line is a flaw the reader works around, but an inline comment
on a wrong line lands in the author's working view and is visibly wrong. With
no citations.txt at all nothing anchors and the whole card stays in the
summary, which is exactly what this bot posts today. The checker never gates
the run: it ran 1-for-2 on real cards, and a heuristic that withholds correct
reviews costs more than the defect it catches.
A review is all-or-nothing -- one anchor GitHub will not take fails the whole
call, summary included, which is worse than the comment this replaces. So a
refusal retries the same endpoint with the anchors folded back into the body
and says so. A review that silently sheds half its findings reads exactly
like a review that only had the other half.
Measured on ten of those real cards, replayed against the diffs they were
written for: the summary a reader meets first drops from 33,025 to 24,173
characters, 27% shorter, with 11 findings moved onto their lines.
Adapted from ATOM rather than copied: aiter's card writes `Review (advisory):`
where ATOM's writes `Review:` and adds a `Perf` line ATOM has no counterpart
for, so the summary matches on the bare word and keeps all three; the dedup
marker stays a literal `aiter-bot` instead of being derived from the
overridable AITER_BOT_NAME, and still searches issue comments as well as
reviews, so the markers already sitting on live PRs are not reposted over.
check_prompts.py gains three guards: the event stays COMMENT with exactly one
POST call site, the --post closure stays matched to the workflow's
permissions, and the anchoring wiring (run_one -> citations.txt -> _lib ->
_publish) cannot be half-removed in silence. selftest.sh now runs
_publish_test.py, and says out loud when pytest is absent rather than
passing over it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: anchor a finding to the section it cites, link what cannot be anchored
Inline anchoring attached a finding to a single line. Two things that costs, both
measured on this bot's own archived cards:
Spans. 25 of 221 archived findings cite a line *range* -- `layernorm.py:1002-1012` --
and every one was anchored to line 1002 alone, so the reader saw a comment pinned to
one line of a block the finding is about, which reads as a claim about that line.
GitHub takes a span as start_line..line with a side for each end; cite a range and it
is now anchored as one. Both endpoints and everything between must be commentable,
which is exactly "inside one hunk" -- checking the ends alone would accept a span
across the gap between two hunks, and one malformed entry fails the whole review,
summary and all other comments with it. When only part of the span is in the diff the
end that is gets a single-line anchor, rather than the finding being dropped.
The span pattern is deliberately tight: an ASCII hyphen with no whitespace. A loose one
reads the real card sentence "flash_kda.py:381 - 6 published tuning candidates" as the
backwards span 381..6. Over 221 findings the tight form matched 25 spans and no false
positive; the loose form added that one sentence and nothing true.
Permalinks. A citation whose line the diff does not reach cannot be anchored -- GitHub
is right to refuse it -- and used to sit in the summary as bare `moe.py:5220` text the
reader had to go and find. It now also gets a blob permalink pinned to the head SHA,
alone on its own line, which is the only place GitHub expands one into the code it
names. Pinned and not a branch: a link that drifts off the code it was written about is
a wrong anchor arriving late. The finding's own text is untouched -- the link is in
addition, never instead.
Neither is invented. Both run through the same gate anchoring already had: a citation
check_citations.py flagged, or a card it never ran on, gets no anchor and no link, and
a path that does not resolve to a file this PR touched gets no link either. A blob URL
built from an unresolved basename is a guess, and a link to the wrong code is worse
than no link for the same reason a wrong anchor is.
Verified by replaying eight real cards against the diffs they were written for: of 37
findings, 11 now take a span anchor, 16 a single line, 2 a permalink only, 8 nothing.
Auditing every span citation in the 57-card corpus, 23 of 35 span-anchor cleanly, 1
falls back to an endpoint, and 11 resolve to no file in the diff and so are left alone.
Replaying also turned up a defect in the index line this change introduced: when a span
collapses to one endpoint the index strips `path:563` and leaves the opening "-569". Fixed
and pinned by a test.
_publish_test.py gains 16 cases (spans, the hunk gap, the prose false positive, the
permalink gates, and a refused *range* review degrading with its text intact);
check_prompts.py gains two drift checks that build a review over a synthetic two-hunk
diff and assert the shape GitHub will take rather than the source that produced it.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: the two bugs that made inline anchoring do nothing at all
Found by running the reviewer on this PR, on box 8, end to end. Seven gates green, 33
unit tests passing, and the payload it produced carried zero inline comments. Either
bug alone is enough to erase the feature; both were present.
**Citations resolved against the wrong tree.** check_citations.py picked one tree for
every citation and preferred merge-target, which fetch.sh checks out at BASE_SHA -- the
code before the PR. Citations into lines this PR added could never resolve there:
`_publish.py:221 -- file has 171 lines`, 171 being the length on base. All six were
hard-failed. head/ holds the PR's version of each changed file, merge-target/ the
pre-PR tree for everything else, so neither alone is right; resolution now tries them
in order per file. The reviewer found this one itself and graded it 🔴.
**A 50%-precision heuristic vetoed the feature.** flagged_citations() counted both
halves of the checker's output, so a proximity note disqualified a finding exactly as a
hard failure did. They are not the same claim: a hard failure means the citation
resolves to nothing, while a note says a quoted symbol is not within five lines of the
cited one -- a quality hint the checker's own docstring puts at ~50% precision. Only
hard failures disqualify now. A heuristic that silently switches off what it guards is
the worse failure: a wrong anchor is visible and correctable, an absent one looks
exactly like a review with nothing to say.
Verified on the real card from that run, with the trees rebuilt from the PR's own head
and base: **0 anchors and a 4163-character summary before, 5 anchors and 990 after**.
Three tests pinned the old veto rule and failed, which is what they are for; the veto
test's fixture now uses a hard failure, and a new test pins that a note leaves the
anchor in place.
Still unverified: whether GitHub accepts these payloads. No code here has made a live
review call.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: rejected validation evidence degrades the review instead of deleting it
Ported from ATOM, where this failed for real. The first live auto-validation
run got as far as invoking the validator, then died: the consumer that checks
a validation report runs under errexit, and `import jsonschema` failed on the
runner. No card was produced at all.
aiter's consumer has the same shape -- 33 fail-closed checks, any one of which
aborts fetch.sh -- so it has the same failure available to it. A review that
vanishes reads, to the human waiting on it, exactly like a bot that is down,
and a missing optional dependency is not evidence that anything about the PR
is wrong.
The integrity checks stay fail-closed: evidence that does not match this PR's
head, base or patch is still never consumed. What changes is the consequence
of rejecting it -- the rejection is captured, its reason recorded in
auto_validation_outcome.txt, and the review falls through to the no-evidence
branch, so the card says validation did not run and names why.
_degrade_test.sh extracts the real consumer region out of fetch.sh by its line
markers and drives those bytes with a report for the wrong head, asserting all
four things the live failure got wrong. Collapsing `set +e` back reproduces
that failure exactly -- verified in both repos before committing.
Not ported: ATOM also had to make its validator print why a non-PASS verdict
happened, because it printed the verdict alone and the report evaporated with
the scratch dir. aiter's validator already names its output file, so that is a
different situation and is left alone rather than changed on spec.
selftest: 85 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: a run that dies in fetch says so, and says what to do about it
Ported from ATOM, where this happened twice in a row on a live run. The log
ended mid-sentence and said nothing further:
[run_one #2889] fetch...
GraphQL: API rate limit already exceeded for user ID 349247671.
Two defects, both present here in the same shape. errexit aborts run_one
inside the fetch pipeline, before the line that classifies a failed fetch can
run; the status is then written by the EXIT trap, which wrote the file and
printed nothing -- so the one place the reader already was said the least.
The traps now say their piece out loud, and the fetch status is taken as a
value and classified.
The classification it would have reached was also wrong for this cause:
"check gh auth/token, network, git and disk" sends someone hunting a broken
credential when the credential is fine and a quota is empty. A quota resets on
GitHub's own clock and the only correct response is to wait and re-run, so it
is named separately, quoting the refusal, and it states that nothing about the
PR was examined -- a run that looked at nothing must not be mistaken for a
review that found nothing.
_fetchfail_test.sh drives that classification with a fetch that fails two
ways, asserting the quota is named, the non-examination stated, and that a
non-quota failure still falls through to the generic cause.
selftest: 86 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: say when the quota comes back, not "within the hour"
"The quota resets on GitHub's own clock (an hour at most)" is not something
anyone can plan around -- it means the same thing one minute before the refill
and fifty-nine minutes before it. GitHub's /rate_limit endpoint does not count
against the quota, so the exact refill time is readable even while the quota
is spent. The line now names it:
GitHub's API quota for this bot is spent (the token is fine) -- it refills
at 06:26 UTC, in about 25 min; re-comment then. Nothing about this PR was
examined.
What is wrong, how long, what to do, and that nothing was looked at. The vague
wording survives as the fallback for when the reset time cannot be read -- a
wrong number would be worse than no number.
The test caught a real defect while being extended for this: the reset lookup
ends in a grep, which returns non-zero when it matches nothing, and under
errexit that killed the run outright -- so the fallback line could never be
reached. Fixed, and both paths are now asserted, along with a non-quota
failure keeping its own cause.
ATOM 97 green / 0 red, aiter 86 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: tell a restricted account apart from a throttled one
Measured on the bot's own token today: rocm-atom-bot reports core 58/60 and
graphql 0/0. An authenticated account gets 5000/5000 -- 60 with GraphQL at
zero is the profile GitHub leaves on an account it has restricted. That is
what has been failing every run, and it is not a quota that refills.
I had this wrong twice in a row, and told a person to wait an hour for it. The
message shipped an hour ago would have said the same: it reads the reset
timestamp and promises a refill. For a restricted account that promise sends
someone to wait for something that never arrives, which is worse than the
vague wording it replaced.
So the two are now distinguished by what only one of them looks like -- a
60-call cap with GraphQL disabled -- and the restricted case says plainly that
waiting will not clear it, and that the account needs unflagging or the bot
needs a different one. Both still say that nothing about the PR was examined.
Test covers all four paths now: refill time readable, refill time unreadable,
restricted account, and a non-quota failure keeping its own cause. Removing
the restricted branch makes it fail on both of its assertions.
ATOM 97 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: the citation checker never ran, and the tests that said it did used the wrong flags
Found by this bot reviewing its own PR. All three findings held up under my
own verification; two of them are about code committed today.
1. check_citations.py's main() called tree_for(); only trees_for() exists, and
it then passed a `trees` it never assigned. Every invocation raised
NameError. run_one.sh's `|| true` swallowed the crash, citations.txt
carried a Python traceback, and _publish.py's flagged_citations() read that
traceback as "nothing flagged" -- so findings were anchored inline with
zero citation checking, which is the exact failure this checker was added
to prevent. The proof is this PR's own run: reports/PR-7303/citations.txt
is a traceback, and the gate was green.
The 34 pytest cases all exercise check(). Nothing called main(). A
function no test calls is a function that does not work yet, so
_citations_test.sh now runs it end to end on a resolvable and an
unresolvable citation; restoring the NameError fails all four assertions.
2. Every fetch-failure classification added today was unreachable in
production. run_one.sh runs `set -euo pipefail`, and
W="$(grep ... | tail | cut)" is a fatal assignment when grep matches
nothing -- the script died there, before any classification. The region
tests passed only because they ran the extracted bytes under bare `set -e`.
Measured both ways: `set -e` writes the status file and names the cause;
`set -euo pipefail` exits 1 silently with no status at all.
That is the defect this project exists to catch, sitting in my own test. All
region tests now run under the flags the scripts actually use, and removing
the guard fails eight assertions instead of passing.
3. The same unguarded shape in fetch.sh's rejection handler (also
`set -euo pipefail`), which would kill the handler whose whole purpose is
to keep the review alive. Guarded in both repos.
ATOM 98 green / 0 red, aiter 87 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: a traceback in citations.txt is not a clean verdict
Found by this bot reviewing this PR, and it is the half of its own earlier
finding that I fixed badly. That finding asked for two things: stop
check_citations.py crashing, and stop flagged_citations() reading a crash as
"nothing was flagged". I did the first and left the second, so the crash was
gone but the defence against the next one was never built.
The module docstring already promised this behaviour -- "when citations.txt is
missing or the checker could not run, nothing is anchored" -- while the code
did the opposite for the one case that actually happened: a file with content
but no CITATIONS verdict line returned an empty set, which means "every
citation checks out", so every finding anchored with no checking at all.
Absence of a verdict line is now treated as "the checker did not run",
however the file got that way. The test feeds the real traceback this PR
produced two revisions ago; removing the guard fails it.
aiter 35 pytest cases, ATOM 33.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: untrack the review outputs that a careless `git add` swept in
b841de1 staged `.claude/skills/review-pr/` as a directory, which picked up
the eleven files a review run had just written to reports/PR-7303/. They are
not part of this change: they are one run's output, about one commit, and
`run_one.sh` regenerates them. A tracked card is also wrong the moment the PR
moves -- the one committed here reports a finding that is already fixed at
head, and it cites a crashed citations.txt as evidence.
A .gitignore in the skill directory stops the next one, because the mistake
is `git add <dir>` and that will happen again.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: a refused post must not exit 0
main() returned 0 whether the review went up or was refused. It printed
"❌ failed to post" and then told the caller everything was fine -- so a
refusal would be invisible to the workflow step, on every run, while each card
was quietly lost.
That matters most for the one refusal the degrade path cannot cover. The
anchored-then-summary fallback handles a bad anchor; it cannot handle a token
that may post issue comments but not create reviews at all (`Issues: write`
without `Pull requests: write` on a fine-grained PAT). Both attempts fail, and
until now the step stayed green.
This is not hypothetical here: aiter-bot has `read` on this repo and has
created zero reviews across the PRs checked, where it has posted an issue
comment on each. That is equally consistent with "the scope is fine and it has
never tried" and with "the scope is missing" -- the two are indistinguishable
from the outside, which is the whole shape this pipeline exists to break. The
holder says the scope is sufficient; this makes being wrong about that cost
one red step instead of every card.
The test pins the refusal the API actually sends and asserts its words reach
the operator. Writing it caught a second defect in itself: stubbing every API
call made the gate skip on PR metadata, so the test passed without reaching
the code it names. It now refuses only the review POST.
aiter 36 cases / 97 green, ATOM 34 cases / 98 green.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: a citation of untouched context was judged an invented path
Both defects found by @zoe-cop in review; both verified before changing
anything, and both hold.
The basename fallback searched trees[0], which is head/ -- a sparse tree
holding only the files the PR changed. A citation of real context code by
bare basename (moe.py:5220 in a file this PR never touched) therefore matched
nothing and was reported as "no such file in the tree", i.e. an invented path,
rather than the ambiguity note it was meant to get. _unflagged_cites then
forfeits the whole finding's anchor AND permalink on any single hard failure,
including a correct, fully-qualified, in-diff citation in the same sentence.
So citing context code switched anchoring off silently -- the failure this
checker was added to prevent, produced by the checker.
It now searches merge-target/, the full tree at BASE_SHA. Fixing that exposed
a second half: hits[0] could come from the diff (present in head/) or from the
basename search (present in merge-target/), while resolution assumed one tree,
so a single hit landed on "is in the diff but not the tree". Resolution now
follows whichever tree actually holds the file. Verified on all three verdicts:
a lone context file resolves, several of the same name give a note, an
invented path still fails.
Second: the summary-only retry appended the folded findings to a body still
carrying build_review's "N finding(s) posted inline, on the lines they are
about" index. True of the attempt GitHub refused, false of the one being sent,
where comments[] is empty -- so the degraded review pointed the reader at
lines carrying nothing and then listed the same findings again. That is the
inverse of the silence this fallback exists to prevent. The index is now
stripped before folding.
@zoe-cop also diagnosed why the existing test could not catch it: it asserts a
retry happened and that comments[] emptied, never what the body says, so it
passes on the stale index alone. The new test asserts the anchored body
carries the index and the degraded body does not.
selftest 97 green / 0 red, 37 pytest cases.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: the drift check died outside a git checkout
Found by running this PR's own verification the way its description tells a
reviewer to: on a clean `git archive HEAD` export, not the working tree.
$ python3 check_prompts.py
FileNotFoundError: '.claude/skills/review-pr/SKILL.md'
_skill_md asked git for the repo root. `git rev-parse --show-toplevel` prints
an empty string when there is no repo, and Path("", ".claude", ...) is then a
RELATIVE path resolved against the caller's cwd -- so the check that exists to
catch prompt drift could not run at all in the one place a reviewer would run
it. It passed every time it was tried because every trial was inside a
checkout, including a "fresh /tmp worktree", which is still a git tree.
SKILL.md sits next to check_prompts.py. It reads it from there and asks git
nothing.
The guard reproduces a real export -- `git archive HEAD | tar -x` of the
tracked tree, no .git -- and asserts exit 0 from a cwd outside it. Writing it
the obvious way first (copy the skill directory alone) asserted something the
project does not promise and failed on an unrelated missing workflow file; a
guard has to test the thing that was promised, which here is the export.
Restoring the git-root lookup turns it red in both repos.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: the guard for leaving a checkout could not itself leave one
The guard added a moment ago built its fixture with `git archive HEAD`. Run
from a working tree that passes; run the suite from a clean export -- which is
what this PR's description tells a reviewer to do -- and there is no repo to
archive from, so the guard failed and the suite went red for a reason that had
nothing to do with the code under test.
A guard that only works inside a checkout cannot test leaving one. It now
builds the fixture directly: the skill tree at its repo depth plus the workflow
file the check reads, in a directory with no .git. No git involved, so it
behaves the same inside a checkout and outside one.
This also closes the loop the previous commit opened. The whole suite now runs
green from inside a clean export in both repos -- aiter 98/0, ATOM 99/0, drift
clean, pytest passing -- which is the state the verification instructions have
been describing all along and that nothing had ever checked.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: raising the per-agent timeout alone silently starves the refuter
Hit while re-reviewing ATOM#2762, whose diff grew past the 40-minute worker
budget after main was merged in. Raising AGENT_TIMEOUT is the obvious response
and the timeout message names that exact knob -- but a review runs two agents
in series, and the gate that starts each one refuses to begin an attempt that
cannot finish inside RUN_BUDGET. So with AGENT_TIMEOUT=5400 against the
default RUN_BUDGET=7200, the worker runs, the refuter cannot start, the
`independent` gate reds, and the review is withheld after an hour of work --
reported as a timeout whose named fix makes it worse the next time.
The constraint is AGENT_TIMEOUT x 2 <= RUN_BUDGET, and nothing enforced it.
It is checked now before any work is spent, with an error that names both
numbers and both ways out. Exit 2, distinct from the review's own failures.
Verified on three pairs: 5400/7200 refused, 5400/14400 accepted, and the
shipped defaults (2400/7200 here, 2400/6000 on aiter) unaffected. Removing the
check turns the selftest red.
ATOM 100 green / 0 red, aiter 99 green / 0 red.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* review-pr: drop the import the git lookup left behind
CI's "Lint the skill for real errors" step runs ruff with --select F,E9 --
the rules that catch actual mistakes rather than style -- and it went red on
F401: `import subprocess` became dead when _skill_md stopped shelling out to
`git rev-parse` in 058dfd0.
My own ruff run used the repo's default rule set, which does not include F401,
so the check I ran and the check CI runs were not the same check. ATOM is
unaffected: its check_prompts still calls subprocess elsewhere.
selftest 99 green / 0 red, ruff --select F,E9 clean.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---------
Co-authored-by: zufayu <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Motivation
This PR improves the performance of the FlyDSL RMSNorm kernel by addressing inefficiencies observed in production-like workloads (e.g., GPT-style shapes such as N=2880).
The previous implementation suffered from:
The goal of this PR is to:
Technical Details
This PR introduces several optimizations to the RMSNorm kernel:
Test Plan
The unit-test against Pytorch reference and Benchmark against AITER script is provided as test_rmsnorm_bench_against_aiter.py. One can run from flydsl dir as python test_rmsnorm_bench_against_aiter.py
Test Result
Baseline:
PASS flydsl_rmsnorm_M3000_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 15.95us FlyDSL= 29.22us speedup= 0.546x
PASS aiter_rmsnorm_M3000_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 15.95us FlyDSL= 29.22us speedup= 0.546x
PASS flydsl_rmsnorm_M4000_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 16.06us FlyDSL= 28.88us speedup= 0.556x
PASS aiter_rmsnorm_M4000_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 16.06us FlyDSL= 28.88us speedup= 0.556x
PASS flydsl_rmsnorm_M5000_N2880_torch.bfloat16 max_delta= 0.015440 close=100.00% AITER= 14.72us FlyDSL= 28.57us speedup= 0.515x
PASS aiter_rmsnorm_M5000_N2880_torch.bfloat16 max_delta= 0.015440 close=100.00% AITER= 14.72us FlyDSL= 28.57us speedup= 0.515x
PASS flydsl_rmsnorm_M7000_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.73us FlyDSL= 28.75us speedup= 0.512x
PASS aiter_rmsnorm_M7000_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.73us FlyDSL= 28.75us speedup= 0.512x
PASS flydsl_rmsnorm_M3072_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 13.99us FlyDSL= 28.19us speedup= 0.496x
PASS aiter_rmsnorm_M3072_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 13.99us FlyDSL= 28.19us speedup= 0.496x
PASS flydsl_rmsnorm_M4096_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 14.25us FlyDSL= 28.45us speedup= 0.501x
PASS aiter_rmsnorm_M4096_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 14.25us FlyDSL= 28.45us speedup= 0.501x
PASS flydsl_rmsnorm_M7168_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.92us FlyDSL= 28.06us speedup= 0.532x
PASS aiter_rmsnorm_M7168_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.92us FlyDSL= 28.06us speedup= 0.532x
PASS flydsl_rmsnorm_M8192_N2880_torch.bfloat16 max_delta= 0.015525 close=100.00% AITER= 16.51us FlyDSL= 28.51us speedup= 0.579x
PASS aiter_rmsnorm_M8192_N2880_torch.bfloat16 max_delta= 0.015525 close=100.00% AITER= 16.51us FlyDSL= 28.51us speedup= 0.579x
PASS flydsl_rmsnorm_M16384_N2880_torch.bfloat16 max_delta= 0.015553 close=100.00% AITER= 30.11us FlyDSL= 46.02us speedup= 0.654x
PASS aiter_rmsnorm_M16384_N2880_torch.bfloat16 max_delta= 0.015553 close=100.00% AITER= 30.11us FlyDSL= 46.02us speedup= 0.654x
Improvement
All cases from dimensions of GPT OSS 120B for RMSnorm operators were passed. Speedup Improvements present on dimension 16384 with 45% improvement from original FlyDSL and 6.7% uplift against Aiter implementation. The remaining cases are improved by 1-2 us on average.
PASS flydsl_rmsnorm_M3000_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 14.97us FlyDSL= 28.75us speedup= 0.521x
PASS aiter_rmsnorm_M3000_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 14.97us FlyDSL= 28.75us speedup= 0.521x
PASS flydsl_rmsnorm_M4000_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 14.00us FlyDSL= 28.38us speedup= 0.493x
PASS aiter_rmsnorm_M4000_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 14.00us FlyDSL= 28.38us speedup= 0.493x
PASS flydsl_rmsnorm_M5000_N2880_torch.bfloat16 max_delta= 0.015440 close=100.00% AITER= 12.88us FlyDSL= 28.06us speedup= 0.459x
PASS aiter_rmsnorm_M5000_N2880_torch.bfloat16 max_delta= 0.015440 close=100.00% AITER= 12.88us FlyDSL= 28.06us speedup= 0.459x
PASS flydsl_rmsnorm_M7000_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.74us FlyDSL= 28.15us speedup= 0.524x
PASS aiter_rmsnorm_M7000_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 14.74us FlyDSL= 28.15us speedup= 0.524x
PASS flydsl_rmsnorm_M3072_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 12.10us FlyDSL= 28.16us speedup= 0.430x
PASS aiter_rmsnorm_M3072_N2880_torch.bfloat16 max_delta= 0.015321 close=100.00% AITER= 12.10us FlyDSL= 28.16us speedup= 0.430x
PASS flydsl_rmsnorm_M4096_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 12.98us FlyDSL= 27.99us speedup= 0.464x
PASS aiter_rmsnorm_M4096_N2880_torch.bfloat16 max_delta= 0.015002 close=100.00% AITER= 12.98us FlyDSL= 27.99us speedup= 0.464x
PASS flydsl_rmsnorm_M7168_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 15.07us FlyDSL= 27.84us speedup= 0.541x
PASS aiter_rmsnorm_M7168_N2880_torch.bfloat16 max_delta= 0.015307 close=100.00% AITER= 15.07us FlyDSL= 27.84us speedup= 0.541x
PASS flydsl_rmsnorm_M8192_N2880_torch.bfloat16 max_delta= 0.015525 close=100.00% AITER= 16.90us FlyDSL= 27.76us speedup= 0.609x
PASS aiter_rmsnorm_M8192_N2880_torch.bfloat16 max_delta= 0.015525 close=100.00% AITER= 16.90us FlyDSL= 27.76us speedup= 0.609x
PASS flydsl_rmsnorm_M16384_N2880_torch.bfloat16 max_delta= 0.015553 close=100.00% AITER= 30.41us FlyDSL= 29.02us speedup= 1.067x
PASS aiter_rmsnorm_M16384_N2880_torch.bfloat16 max_delta= 0.015553 close=100.00% AITER= 30.41us FlyDSL= 29.02us speedup= 1.067x