refactor(mimo): reuse shared dynamic-resolution pixel shuffle - #6482
Draft
cuichenx wants to merge 2 commits into
Draft
refactor(mimo): reuse shared dynamic-resolution pixel shuffle#6482cuichenx wants to merge 2 commits into
cuichenx wants to merge 2 commits into
Conversation
Signed-off-by: Ehsan Hosseini Asl <ehsan.hosseiniasl@gmail.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: Chen Cui <chcui@nvidia.com>
cuichenx
force-pushed
the
agent/fix-pixel-shuffle-spatial-grouping
branch
from
August 12, 2026 15:14
6b0dde3 to
c7e3eff
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.
What does this PR do?
Make the MIMO RADIO dynamic-resolution adapter reuse the shared spatial pixel
shuffle corrected by #6255.
The MIMO wrapper still owns the operation it uniquely needs: splitting one
packed variable-resolution stream into individual tiles and concatenating the
results. It no longer carries a second copy of the spatial rearrangement.
Instead, every tile calls
llava_model.pixel_shuffle(..., h=..., w=...), the same primitive used bynon-MIMO LLaVA.
The accompanying mixed 2x4/4x4 regression compares the packed MIMO wrapper
directly with calls to the shared function, preventing the two paths from
silently diverging again.
Stacked dependency
This PR is intentionally stacked on #6255 and preserves that earlier PR's
implementation. Its parent is the exact #6255 head commit
c01991408020ae7c6d9bc77e98196e04e21bac73; this PR adds one commit touchingonly:
examples/mimo/model_providers/radio_encoder.pytests/unit_tests/models/mimo/test_radio_encoder.pyBecause #6255 comes from another fork, GitHub cannot select its head branch as
this PR's displayed base. Until #6255 merges, the Files changed view against
NVIDIA/Megatron-LM:mainalso shows #6255's primitive and temporal-videochanges. Those changes are byte-identical to #6255 and are not being proposed
as alternatives here. After #6255 lands, this branch will be rebased onto the
updated main so the PR displays only the two-file MIMO delta.
Issue tracking
Depends on #6255.
Contribution process
Pre-checks
Validation
The exact stacked tree (
#6255 head + MIMO commit) was validated on one H100:This covers the mixed-size delegation regression, all fixed-resolution flag
variants, and the dynamic-resolution RADIO GPU forward/backward path.
llava_model.py, RADIO temporal code, and correspondingtests are unchanged from
c0199140.