[PyTorch] Change order of args in another permutation triton kernel #2488
Merged
Merged
Conversation
Signed-off-by: tdophung <tdophung@nvidia.com>
Collaborator
Author
|
/te_ci L0 pytorch |
Contributor
Greptile OverviewGreptile SummaryCompletes the argument reordering work from PR #2416 by updating
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Caller as PyTorch Layer<br/>(permutation.py)
participant Wrapper as unpermute_with_mask_map_bwd_with_merging_probs<br/>(triton/permutation.py)
participant Kernel as _unpermute_bwd_with_merging_probs_kernel<br/>(common/triton/permutation.py)
Caller->>Wrapper: Call with tensors and parameters
Note over Wrapper: Create output tensors:<br/>act_grad, merging_probs_grad
Wrapper->>Kernel: Pass args in JAX-Triton compatible order:<br/>1. Input pointers (fwd_output_grad, fwd_input, etc.)<br/>2. Strides (8 stride parameters)<br/>3. Output pointers (act_grad, merging_probs_grad)<br/>4. Metas (num_experts, hidden_size, etc.)
Note over Kernel: Process unpermute backward pass<br/>with merging probabilities
Kernel-->>Wrapper: Writes to output tensors
Wrapper-->>Caller: Return act_grad, merging_probs_grad
|
yaox12
approved these changes
Dec 9, 2025
jberchtold-nvidia
approved these changes
Dec 9, 2025
Collaborator
|
/te-ci L0 pytorch |
KshitijLakhani
pushed a commit
that referenced
this pull request
Dec 15, 2025
…2488) change order Signed-off-by: tdophung <tdophung@nvidia.com>
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.
Description
Change order of args in function that I missed from #2416
Fixes # (issue)
Type of change
Changes
change order of arhgs in _unpermute_bwd_with_merging_probs_kernel
Checklist: