Skip to content

Upstream sync 7/N: merge cf567cbc71 attention benchmarks (conflict) - #1100

Merged
mgehre-amd merged 2 commits into
rogarcia.merge-upstream-06from
rogarcia.merge-upstream-07
Aug 13, 2026
Merged

mgehre-amd merged 2 commits into
rogarcia.merge-upstream-06from
rogarcia.merge-upstream-07

Conversation

@roberteg16

@roberteg16 roberteg16 commented Aug 13, 2026

Copy link
Copy Markdown

Context

Seventh step of the batched upstream catch-up. Stacked on #1098 (base rogarcia.merge-upstream-06); retarget to gfx11 once #1097 and #1098 land.

Conflict-only step: exactly one upstream commit.

Merged upstream commit cf567cbc71 "[Attention] Improve attention benchmarks: configs and profiling (vllm-project#39336)"
Landed on upstream main 2026-06-12 20:24 UTC
Commits in this PR 1

It lands squarely in benchmarks/attention_benchmarks/, where the fork carries six commits of its own (skip/intermittent/cooldown flags, gfx1151 TRITON_ATTN tuning, YAML configs for pytest).

Conflicts and resolutions

common.py — upstream adds a median_time field to BenchmarkResult.to_dict(); the fork nulls every timing field when the run was skipped. Kept the fork's if not self.skip else None guard and applied it to median_time as well, so skipped runs stay uniformly null.

benchmark.py — both sides add imports at the same line (json vs os/shutil/subprocess). Kept both.

A second breakage git did not flag

create_skipped_result() is a fork-only helper, and upstream made median_time a required dataclass field with no default. The helper does not pass it, so every skipped benchmark would have raised TypeError — and git merged that file region without a murmur, because the two sides touched different parts of it.

Fixed here, and all seven BenchmarkResult(...) call sites in the directory were audited with an AST pass against the dataclass's required-field set; this was the only one missing an argument.

This is the second occurrence of the same pattern in this sync series (see #1097's stale ops.impl("ggml_*") registrations). Worth carrying forward as a standing check: after each merge, verify that fork-only code still satisfies any API upstream changed.

How bad this would have been. Not a rarely-used manual flag: tests/kernels/attention/benchmark/test_benchmark_attention.py defines a per-platform SKIP_CASES dict, passes it to benchmark.py via --skip, and the golden validator relies on the skipped case still being present in the output JSON (if actual.get("skip"): continue). So the attention golden-regression suite hits this path on every run that has skip cases defined for the platform — it would have failed outright on gfx1151, not just for someone experimenting with --skip by hand.

Test plan

MatthewBonanni and others added 2 commits June 12, 2026 16:24
Conflict-only step of the upstream catch-up. cf567cb is "[Attention]
Improve attention benchmarks: configs and profiling (vllm-project#39336)", which lands
in benchmarks/attention_benchmarks/ where the fork carries six commits of
its own (skip/intermittent/cooldown flags, gfx1151 TRITON_ATTN tuning, YAML
configs for pytest).

Two conflicts:

common.py: upstream adds a median_time field to BenchmarkResult.to_dict();
the fork nulls every timing field when the run was skipped. Keep the fork's
"if not self.skip else None" guard and apply it to median_time too.

benchmark.py: both sides add imports at the same spot. Keep both.

Also fixes create_skipped_result(), which git merged cleanly but which
upstream's change breaks: median_time is a required dataclass field with no
default, and that fork-only helper does not pass it, so every skipped
benchmark would have raised TypeError. Audited all seven BenchmarkResult
call sites in the directory; this was the only one missing it.

Signed-off-by: Robert Esclapez Garcia <robert.garcia@amd.com>
@mgehre-amd

Copy link
Copy Markdown

Why do we have create_skipped_result on the fork? Do we still need it?

@roberteg16

Copy link
Copy Markdown
Author

Why do we have create_skipped_result on the fork? Do we still need it?

We need it as long as long we kept our feature of golden reference testing

@mgehre-amd
mgehre-amd merged commit 5c155d4 into rogarcia.merge-upstream-06 Aug 13, 2026
6 checks passed
@roberteg16
roberteg16 deleted the rogarcia.merge-upstream-07 branch August 28, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants