Skip to content

ci: guard H100-calibrated test assertions for B300 (SM103) runners - #83

Merged
jiahy0825 merged 5 commits into
mainfrom
ci/test-b300-runners
Sep 26, 2026
Merged

jiahy0825 merged 5 commits into
mainfrom
ci/test-b300-runners

Conversation

@cennn

@cennn cennn commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

MagiCompiler CI now runs on B300 (SM103) self-hosted runners. Perf thresholds and timing assertions are calibrated for H100 — on B300 the operator mix shifts and sub-millisecond CUDA event medians hit noise floors, causing spurious failures in perf and api shards.

assert_speedup already had an is_perf_calibrated_gpu() guard, but assert_magi_vs_torch and the API entry-point timing consistency checks did not.

Changes

  • Guard assert_magi_vs_torch with is_perf_calibrated_gpu() (tests/perf_tests/utils.py) — consistent with the existing guard on assert_speedup. On B300, magi-vs-torch ratio drops below the H100 threshold (e.g. 0.98x vs 1.05x) due to operator mix differences; silently passes on non-calibrated GPUs.

  • Guard timing consistency assertions (tests/api_tests/test_magi_compile.py) — the max/min < 1.2 checks across compile entry points fail on B300 where CUDA event medians are ~50μs (vs ~200μs on H100), causing noise-dominated ratios of 3-4x.

Result

All 16 test jobs (8 shards × 2 PyTorch versions) pass on B300 SM103 runners.

Verify that the 8 new magi-compiler CI runners on B300 (SM103)
can build and run all test shards successfully.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
assert_speedup already skips on non-H100 hardware, but
assert_magi_vs_torch was missing the same guard. The conv
channels-last thresholds are H100-specific; on B300 (SM103)
the pass benefit is narrower and trips the assertion.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
The max/min < 1.2 check compares sub-millisecond CUDA event medians.
On B300 (SM103) the fastest entry point hits ~50μs while others stay
at ~200μs, yielding 3-4x ratios that are noise at this timescale.
Reuse the existing is_perf_calibrated_gpu() guard.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
…d GPUs

profile_sync does lockstep JIT measurement of every graph node; on a
cold B300 (no Triton cache) this can exceed 900s. Raise to 1800s for
profile_sync only; other cost modes keep 900s.

The api test entry-point timing consistency check (max/min < 1.2) hits
CUDA event noise at sub-millisecond medians on B300. Guard it with
is_perf_calibrated_gpu() like the perf shard assertions.
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
@cennn cennn added the ci:run Trigger CI integration tests label Sep 26, 2026
@github-actions github-actions Bot removed the ci:run Trigger CI integration tests label Sep 26, 2026
@cennn cennn changed the title ci: smoke test B300 runners (SM103) [WIP] ci: guard H100-calibrated test assertions for B300 (SM103) runners Sep 26, 2026
@cennn cennn changed the title [WIP] ci: guard H100-calibrated test assertions for B300 (SM103) runners ci: guard H100-calibrated test assertions for B300 (SM103) runners Sep 26, 2026

@jiahy0825 jiahy0825 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiahy0825
jiahy0825 merged commit bf21e57 into main Sep 26, 2026
22 checks passed
@jiahy0825
jiahy0825 deleted the ci/test-b300-runners branch September 26, 2026 15:50
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.

2 participants