Skip to content

fix(nixl): replay strided views on inference#3113

Merged
S1ro1 merged 2 commits into
mainfrom
fix/nixl-replay-strided-views
Jul 23, 2026
Merged

fix(nixl): replay strided views on inference#3113
S1ro1 merged 2 commits into
mainfrom
fix/nixl-replay-strided-views

Conversation

@S1ro1

@S1ro1 S1ro1 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • require the directly transported replay prefix to remain contiguous
  • split replay at the first strided operation
  • reproduce the strided view and the remaining operation suffix on inference

Why

A strided tensor can share the trainer root storage without being a contiguous transfer region. Treating that view as directly transportable fragments the NIXL copy plan and can make synchronization pathologically slow.

Validation

Validated with the Laguna-XS.2 NIXL + ModelExpress Kubernetes run:

  • initial 2 x TP8 pool initialized as 16 ranks
  • staggered third TP8 server joined as ranks 16-23
  • initial policy transfer completed in about 7.5 seconds
  • first 24-rank transfer completed in about 10.7 seconds
  • training continued through subsequent synchronized steps

Note

Medium Risk
Changes how trainer→inference weight slices are split between RDMA and local replay; incorrect boundaries could corrupt weights, but the fix is narrowly scoped to prefix eligibility in replay planning.

Overview
NIXL weight transfer now treats only contiguous same-dtype views of the trainer root as directly RDMA-able; the prefix walk in plan_tensor_replay breaks when is_contiguous() fails, not only on dtype change or non-view tensors.

Strided views that still alias root storage are no longer included in the bulk copy plan—those ops move into replay_ops and run on the inference receive arena, avoiding fragmented NIXL copy plans and slow sync (as seen with staggered TP pool joins).

Reviewed by Cursor Bugbot for commit c95589c. Bugbot is set up for automated code reviews on this repo. Configure here.

@JannikSt JannikSt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was this written by hand?

@S1ro1

S1ro1 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Was this written by hand?

artisanally crafted with love

@S1ro1
S1ro1 merged commit 783cff5 into main Jul 23, 2026
18 checks passed
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