Skip to content

Separate InnerShuffle physical and logical input shapes - #1649

Merged
auphelia merged 3 commits into
Xilinx:devfrom
klassen9:fix/innershuffle
Aug 4, 2026
Merged

Separate InnerShuffle physical and logical input shapes#1649
auphelia merged 3 commits into
Xilinx:devfrom
klassen9:fix/innershuffle

Conversation

@klassen9

@klassen9 klassen9 commented Jul 29, 2026

Copy link
Copy Markdown

Problem

When a Reshape was fused into a Shuffle, InnerShuffle ignored it and transposed the physical tensors last two axes. So (1,768,14,14) -> reshape -> (1,768,196) -> transpose (0,2,1) -> (1,196,768) swapped the two 14 dims instead of swapping 768 and 196, producing the wrong result.

Fix

Track the logical (post-reshape) shape the transpose acts on separately from the physical input tensor

  • in_shape physical tensor
  • transpose_in_shape (new) logical view

Update: Also fixed the InnerShuffle page guard

@auphelia
auphelia requested a review from STFleming July 30, 2026 08:29

@STFleming STFleming left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great catch @klassen9 and thanks for bringing the fix up along with a test for the failing case!

I'm also happy for the page-guard fix to be included here also.

@auphelia
auphelia merged commit 5f96a1c into Xilinx:dev Aug 4, 2026
3 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.

3 participants