[JAX] Schedule EP dispatch/combine on XLA collective stream#3231
[JAX] Schedule EP dispatch/combine on XLA collective stream#3231phu0ngng wants to merge 3 commits into
Conversation
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Greptile SummaryThis PR pins the TE-JAX Expert Parallelism dispatch/combine ops to XLA's
Confidence Score: 5/5Safe to merge — the change is fully additive, the JAX version gate ensures no breakage on older installs, and the new test validates the annotation end-to-end for the forward path. The decorator is a clean, well-isolated addition that falls back to a no-op on older JAX. All five EP primitives are decorated, the version guard is consistent with existing patterns in version_utils.py, and the lazy import of compute_on correctly prevents import-time failures on JAX < 0.10.0. The new HLO test in tests/jax/test_multi_process_ep.py only covers the forward pass, leaving ep_dispatch_bwd and ep_combine_bwd without annotation verification. Important Files Changed
Reviews (3): Last reviewed commit: "[JAX] Gate EP collective-stream annotati..." | Re-trigger Greptile |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
|
/te-ci JAX L1 |
| import jax | ||
| import jax.numpy as jnp | ||
| from jax import dtypes, ffi | ||
| from jax.experimental.compute_on import compute_on |
There was a problem hiding this comment.
What JAX version was this added in? Should we guard with something like
try:
from jax.experimental.compute_on import compute_on
except ImportError:
def compute_on(stream_name: str):
""" compute_on shim for older JAX versions """
# Make @compute_on annotation do nothing to the annotated function
return lambda f: f
There was a problem hiding this comment.
Good suggestion for versioning.
The import compute_on is available since 2024, I think, so this check won't help here.
I added a guard for JAX 0.10.0.
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
|
/te-ci JAX L1 |
Description
Pin the TE-JAX Expert Parallelism dispatch/combine ops to XLA's high-priority collective stream so the scheduler serializes them with native collectives instead of overlapping.
Type of change
Checklist: