Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update transpose doc #6072

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

gramalingam
Copy link
Contributor

Description

Clarify the permutation specification of the Transpose op.

Motivation and Context

It is not clear from the spec whether the i-th input axis corresponds to the perm[i]-th output axis or whether the i-th output axis corresponds to perm[i]-th input axis. Make this clear.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@gramalingam gramalingam requested a review from a team as a code owner April 9, 2024 23:45
onnx/defs/tensor/defs.cc Fixed Show fixed Hide fixed
@gramalingam gramalingam added operator Issues related to ONNX operators spec clarification Clarification of the ONNX spec needed labels Apr 9, 2024
@justinchuby
Copy link
Contributor

Would it be a good idea to address #4611 in the same PR?

@gramalingam
Copy link
Contributor Author

Would it be a good idea to address #4611 in the same PR?

Maybe. But at least some of those questions require some investigation ... it is easy enough to say 0D and 1D inputs should be supported (the op is well-defined for these cases). But that doesn't mean that a specific implementation will support them ... only if we test it out, will we realize if some assumptions are being made.

Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
@gramalingam gramalingam added the auto update doc Generate md/proto files automatically using the CI pipeline label Apr 15, 2024
@gramalingam
Copy link
Contributor Author

Added point about perm being optional.

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.99%. Comparing base (4128a09) to head (426c51b).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6072      +/-   ##
==========================================
+ Coverage   56.97%   56.99%   +0.01%     
==========================================
  Files         506      506              
  Lines       30483    30489       +6     
  Branches     4593     4593              
==========================================
+ Hits        17369    17378       +9     
+ Misses      12285    12283       -2     
+ Partials      829      828       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justinchuby justinchuby added the review needed: operators approvers Require reviews from members of operators-approvers label Apr 16, 2024
@gramalingam
Copy link
Contributor Author

As for the question about 0D input tensors (scalars): it looks like both ONNX shape inference as well as its reference implementation need to be extended/fixed to handle this case.

@gramalingam gramalingam self-assigned this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto update doc Generate md/proto files automatically using the CI pipeline operator Issues related to ONNX operators review needed: operators approvers Require reviews from members of operators-approvers spec clarification Clarification of the ONNX spec needed
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants