[JAX] Schedule EP dispatch/combine on XLA collective stream - #3231
Conversation
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Greptile SummaryThis PR pins all five TE-JAX Expert Parallelism FFI helpers (
Confidence Score: 5/5Safe to merge — the feature is gated behind a version check so older JAX installations see no behavioural change, and the new test validates the annotation on the forward path. The change is an opt-in scheduling hint applied at module import time. The version guard correctly isolates older runtimes, the decorator mechanism is straightforward, and the new HLO test confirms the annotation appears in compiled output. No logic errors or API misuses were found. The ep_dispatch_bwd and ep_combine_bwd backward ops are decorated but their annotation is not verified by any test — worth adding a backward-path assertion to test_z_no_unexpected_reshard_in_hlo_bwd or a companion test. Important Files Changed
Sequence DiagramsequenceDiagram
participant TE as TE ep.py import
participant VU as version_utils
participant XLA as XLA scheduler
TE->>VU: "is_collective_stream_supported()?"
VU-->>TE: "JAX >= 0.10.0 → True"
TE->>TE: "compute_on(gpu_stream:collective)(func) wraps all 5 EP helpers"
Note over TE,XLA: At JIT compile time
TE->>XLA: "EpDispatchPrimitive.bind() with _xla_stream_annotation=collective"
XLA-->>XLA: "schedule on NCCL collective stream"
TE->>XLA: "EpCombinePrimitive.bind() with _xla_stream_annotation=collective"
XLA-->>XLA: "serialised with native all-reduce / all-to-all ops"
Reviews (5): Last reviewed commit: "Merge branch 'main' into ep/jax_col_stre..." | 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 |
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
|
/te-ci JAX L1 |
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
jberchtold-nvidia
left a comment
There was a problem hiding this comment.
LGTM pending CI, thanks!
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: