Skip to content

Make the PyTorch walltime benchmarks opt-in via a #bench comment - #4383

Open
kinto0 wants to merge 1 commit into
facebook:mainfrom
kinto0:export-D114413106
Open

Make the PyTorch walltime benchmarks opt-in via a #bench comment#4383
kinto0 wants to merge 1 commit into
facebook:mainfrom
kinto0:export-D114413106

Conversation

@kinto0

@kinto0 kinto0 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary:
The pytorch walltime benchmarks run on every pull request today. They are the expensive half of the suite — a multi-gigabyte cold start driving the LSP server over all cores. They also fail flame-graph generation often enough that unrelated PRs collect a stream of "Unable to generate the flame graphs" comments from CodSpeed.

Make them opt-in: the workflow now also listens for issue_comment, and the walltime job runs only when a PR gets a #bench comment. The simulation microbenchmarks are cheap and deterministic, so they keep running on every PR and are excluded from the comment trigger.

issue_comment fires against the default branch, so the job checks out refs/pull/<n>/merge to benchmark the PR rather than main. That makes the author_association clause load-bearing rather than defensive: without it, any GitHub user could comment #bench on a fork PR and have its code run on our runner with an id-token: write token.

Differential Revision: D114413106

Summary:
The `pytorch` walltime benchmarks run on every pull request today. They are the expensive half of the suite — a multi-gigabyte cold start driving the LSP server over all cores. They also fail flame-graph generation often enough that unrelated PRs collect a stream of "Unable to generate the flame graphs" comments from CodSpeed.

Make them opt-in: the workflow now also listens for `issue_comment`, and the `walltime` job runs only when a PR gets a `#bench` comment. The `simulation` microbenchmarks are cheap and deterministic, so they keep running on every PR and are excluded from the comment trigger.

`issue_comment` fires against the default branch, so the job checks out `refs/pull/<n>/merge` to benchmark the PR rather than main. That makes the `author_association` clause load-bearing rather than defensive: without it, any GitHub user could comment `#bench` on a fork PR and have its code run on our runner with an `id-token: write` token.

Differential Revision: D114413106
@meta-cla meta-cla Bot added the cla signed label Jul 31, 2026
@meta-codesync

meta-codesync Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

@kinto0 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114413106.

@kinto0

kinto0 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

#bench

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant