Skip to content

ci(gpu): post bench compare on the gpu-test label - #148

Merged
tetsuo-cpp merged 1 commit into
canonfrom
cursor/gpu-bench-pr-comment-6272
Nov 9, 2026
Merged

tetsuo-cpp merged 1 commit into
canonfrom
cursor/gpu-bench-pr-comment-6272

Conversation

@tetsuo-cpp

@tetsuo-cpp tetsuo-cpp commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Why

Adding the gpu-test label runs the GPU tests and leaves the pull request with a pass or fail check. The same run should say what that pull request does to performance against canon, and how far the result sits from CUDA.

The job runs one bench compare of GitHub's merge commit against the base commit that merge used, then posts the result as a single comment. A later label edits that comment.

What changed

  • bench compare --comment writes the review body before the process exits, including when a case is slower.
  • A finished compare posts a markdown table of the case rows, then bullets for the base commit, the head commit, and the rental. The gap column is the CUDA comparison. A run with no measurement posts the error and the two commits.
  • The gpu-test job posts that file after the GPU tests pass.

Scope

  • Covers a pull request that receives the gpu-test label. A push to canon still only runs the GPU tests.
  • Does not run bench gap. Compare already records the CUDA gap in the same rental.
  • A slower case still fails the compare step. The comment is not a substitute for that failure.

Tradeoffs

  • The measured head compiler is the merge commit, not the branch tip. The Head bullet is that merge commit. Comparing the branch tip with the live canon tip would count newer canon commits as the pull request's effect when the branch is behind.
  • Compare rents a second GPU at sm_89, and only after the tests pass. The test rental stays at sm_70 and is not reused.

Blast Radius

The labeled job gains two compiler builds and one more rental, with a 25 minute limit on the compare step so a slow rental can still post. The label is still removed at the end. The checkout fetch depth is now 2 for every run of this workflow, including a push to canon.

Verification

  • uv run pytest -q gpu_test/test_bench_comment.py gpu_test/test_bench_compare.py -m "not gpu" passed 35 tests.
  • uv run ruff check and uv run ruff format --check passed on the touched Python files.
  • A depth-2 fetch of a merge commit resolves both parents. A depth-1 fetch does not, even after the parent objects are fetched.
  • The workflow posts with gh api -F, which reads the comment file. -f would send the path string. The next label edits the comment that starts with the marker. The older path-only comment does not, so delete that one by hand.
Open in Web Open in Cursor 

@tetsuo-cpp tetsuo-cpp added the gpu-test Run GPU tests for this pull request label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

@/home/runner/work/_temp/bench-comment.md

@github-actions github-actions Bot removed the gpu-test Run GPU tests for this pull request label Nov 8, 2026
@tetsuo-cpp tetsuo-cpp added the gpu-test Run GPU tests for this pull request label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Bench compare against canon: no case slower across 6 cases

case verdict ratio mad base head gap
scale_i64 no change 1.000 0.000 272.0 us 272.0 us 1.01x
axpy_f64 no change 1.000 0.000 401.9 us 401.9 us 1.00x
reduce_sum_f64 no change 1.000 0.000 473.6 us 473.7 us 1.64x
matmul_f64_naive no change 1.000 0.000 45.3 us 45.3 us 1.49x
matmul_f64_tiled no change 1.000 0.000 360.9 us 360.9 us 1.58x
attention_f32 no change 1.000 0.000 1251.0 us 1251.0 us 9.72x
  • Base: 14a99ffc14ab83c7f00f95d37381dcc214ba5b9b
  • Head: 0bc3c6829f347635ca81795008eba296faaf1c9b
  • Rental: 11397ec7000b1e5e28d8eace2894aa60, driver 13.3, SM clock 2460 MHz, memory clock 8501 MHz, sm_89

@github-actions github-actions Bot removed the gpu-test Run GPU tests for this pull request label Nov 8, 2026
@cursor
cursor Bot force-pushed the cursor/gpu-bench-pr-comment-6272 branch 2 times, most recently from 79605a0 to 1cf6c5f Compare November 8, 2026 23:31
The gpu-test label runs bench compare of GitHub's merge commit against the base commit that merge used, then posts one comment. A finished run is a markdown table of the case rows, then bullets for the base commit, the head commit, and the rental.
@cursor
cursor Bot force-pushed the cursor/gpu-bench-pr-comment-6272 branch from 89a3201 to 972f3b2 Compare November 8, 2026 23:59
@tetsuo-cpp tetsuo-cpp added the gpu-test Run GPU tests for this pull request label Nov 9, 2026
@github-actions github-actions Bot removed the gpu-test Run GPU tests for this pull request label Nov 9, 2026
@tetsuo-cpp
tetsuo-cpp merged commit 5a23960 into canon Nov 9, 2026
2 checks passed
@tetsuo-cpp
tetsuo-cpp deleted the cursor/gpu-bench-pr-comment-6272 branch November 9, 2026 00:41
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.

1 participant