Skip to content

Run the PyTorch H2D/D2H perf gate in GitHub CI - #1296

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_1002930241
Oct 23, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_1002930241

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Run the PyTorch H2D/D2H perf gate in GitHub CI

The h2d_d2h_gating workload ran with the default --framework=jax, so the torch
floors were never checked. This makes the torch gate mirror the JAX one: it
runs on the same runner, enforces floors recorded there, and is a required
check.

  • Add ci/run_in_torch_env.py, which sets up an open-source torch environment
    and runs a script in it: installs torch, torch_tpu and libtpu 0.0.50, builds
    the torch extension with build.sh torch (it can't come from bazel run),
    links it to torch_tpu's glue library, and configures libtpu for a
    multi-process slice in a GKE container.
  • Add the h2d_d2h_gating_torch workload (required check in copy.bara.sky) and
    the h2d_d2h_record_torch workload; pass --framework=jax to the JAX workloads
    explicitly and move the torch_* metrics to the torch workload.
  • Re-record the torch floors on the CI runner (--record --iters=500).
  • Use the 2x4 v5e-8 topology in perf_core's open-source build.
  • Document that floors are recorded only on the CI runner.

@google-cla

google-cla Bot commented Oct 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@copybara-service
copybara-service Bot force-pushed the test_1002930241 branch 12 times, most recently from 8ff4c12 to ec516f7 Compare October 23, 2026 05:04
The h2d_d2h_gating workload ran with the default --framework=jax, so the torch
floors were never checked. This makes the torch gate mirror the JAX one: it
runs on the same runner, enforces floors recorded there, and is a required
check.

- Add ci/run_in_torch_env.py, which sets up an open-source torch environment
  and runs a script in it: installs torch, torch_tpu and libtpu 0.0.50, builds
  the torch extension with `build.sh torch` (it can't come from `bazel run`),
  links it to torch_tpu's glue library, and configures libtpu for a
  multi-process slice in a GKE container.
- Add the h2d_d2h_gating_torch workload (required check in copy.bara.sky) and
  the h2d_d2h_record_torch workload; pass --framework=jax to the JAX workloads
  explicitly and move the torch_* metrics to the torch workload.
- Re-record the torch floors on the CI runner (--record --iters=500).
- Use the 2x4 v5e-8 topology in perf_core's open-source build.
- Document that floors are recorded only on the CI runner.

PiperOrigin-RevId: 1005309397
@copybara-service
copybara-service Bot merged commit 31bf0f4 into main Oct 23, 2026
1 check failed
@copybara-service
copybara-service Bot deleted the test_1002930241 branch October 23, 2026 05:21
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.

0 participants