Add PyTorch support to TPU Raiden H2D/D2H presubmit performance gating. - #925
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
|
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
Bot
force-pushed
the
test_981433715
branch
3 times, most recently
from
September 21, 2026 01:12
7023f81 to
35ace3b
Compare
- Decouple `perf_core.py` under a unified, narrow public function `measure(...)` supporting both `framework="jax"` and `framework="torch"`. Callers do not need to know about framework-specific runtime setups, memory pinning, or worker multi-processing. - Add PyTorch SPMD multi-processing transfer execution (`_torch_worker_fn`) using `torch.multiprocessing.spawn`, rank synchronization via `dist.all_reduce` (MIN/MAX wall-clock timing across ranks), and pre-measurement byte-integrity verification. - Update `h2d_d2h_benchmark_gating.py` with `--framework=jax|torch|all` support (defaulting to `jax` for external CI compatibility), allowing multi-framework performance gating on physical TPU hardware. - Unify test shapes and baselines in `h2d_d2h_gating_baselines.json` under a single hardware `configs` list, holding both JAX and PyTorch to the same physical DMA throughput floors without artificial branching. - Update `h2d_d2h_gating` in `benchmark_registry.pbtxt` with symmetrical JAX (`jax_...`) and PyTorch (`torch_...`) metrics, plus legacy un-prefixed aliases to maintain continuous tracking on `go/tpu-sync-oss-mlcompass`. - Allow `torch` and `torch_tpu` in `static_imports_check.py` to validate public PyTorch imports during Copybara analysis export. - Register `h2d_d2h_benchmark_gating_torch_gl` and `h2d_d2h_benchmark_gating_gl` test targets and add PyTorch dependencies to `BUILD`. - Update `H2D_D2H_GATING_TEST.md` documentation with an architectural flowchart of the gating workflow. PiperOrigin-RevId: 981433715
copybara-service
Bot
force-pushed
the
test_981433715
branch
from
September 21, 2026 01:13
35ace3b to
ce82cd0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PyTorch support to TPU Raiden H2D/D2H presubmit performance gating.
perf_core.pyunder a unified, narrow public functionmeasure(...)supporting bothframework="jax"andframework="torch". Callers do not need to know about framework-specific runtime setups, memory pinning, or worker multi-processing._torch_worker_fn) usingtorch.multiprocessing.spawn, rank synchronization viadist.all_reduce(MIN/MAX wall-clock timing across ranks), and pre-measurement byte-integrity verification.h2d_d2h_benchmark_gating.pywith--framework=jax|torch|allsupport (defaulting tojaxfor external CI compatibility), allowing multi-framework performance gating on physical TPU hardware.h2d_d2h_gating_baselines.jsonunder a single hardwareconfigslist, holding both JAX and PyTorch to the same physical DMA throughput floors without artificial branching.h2d_d2h_gatinginbenchmark_registry.pbtxtwith symmetrical JAX (jax_...) and PyTorch (torch_...) metrics, plus legacy un-prefixed aliases to maintain continuous tracking ongo/tpu-sync-oss-mlcompass.torchandtorch_tpuinstatic_imports_check.pyto validate public PyTorch imports during Copybara analysis export.h2d_d2h_benchmark_gating_torch_glandh2d_d2h_benchmark_gating_gltest targets and add PyTorch dependencies toBUILD.H2D_D2H_GATING_TEST.mddocumentation with an architectural flowchart of the gating workflow.