Skip to content

[FRONTEND][ONNX] Fix operator Transpose: TVMError: PermuteDims expects the number of input axes to equal the ndim of the input tensor#18435

Merged
tlopex merged 3 commits intoapache:mainfrom
cchung100m:issue-17737
Nov 14, 2025

Conversation

@cchung100m
Copy link
Contributor

@cchung100m cchung100m commented Nov 12, 2025

This PR is trying to fix issues #17737.

The original Transpose._impl_v13 method did not handle:

  • Scalar inputs: according to ONNX SPEC, transposing a scalar should return the scalar unchanged
  • Validation of axes vs. tensor dimensions

…the number of input axes to equal the ndim of the input tensor
@cchung100m cchung100m marked this pull request as ready for review November 13, 2025 17:17
Copy link
Member

@tlopex tlopex left a comment

Choose a reason for hiding this comment

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

LGTM!

@tlopex tlopex merged commit 0754ad8 into apache:main Nov 14, 2025
12 checks passed
@cchung100m cchung100m deleted the issue-17737 branch November 14, 2025 08:05
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