Skip to content

[torch ops] Fix permute op handling for negative dim indices#4447

Open
vakumar1 wants to merge 1 commit intollvm:mainfrom
vakumar1:neuron_permute_neg_index
Open

[torch ops] Fix permute op handling for negative dim indices#4447
vakumar1 wants to merge 1 commit intollvm:mainfrom
vakumar1:neuron_permute_neg_index

Conversation

@vakumar1
Copy link
Copy Markdown

  • currently the torch permute op implementation assumes that a dimension index of -1 denotes an unknown dimension
  • the actual implementation of torch.permute treats negative indices as relative to the rank (i.e., for x < 0 the index is rank + x)
  • --> all negative indices are normalized in the permute op implementation

@vakumar1 vakumar1 marked this pull request as ready for review January 26, 2026 22:24
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