[Relax][Frontend]Fix: Output tensor with zero dimension after torch.u…#17990
Merged
yongwww merged 2 commits intoapache:mainfrom May 20, 2025
Merged
[Relax][Frontend]Fix: Output tensor with zero dimension after torch.u…#17990yongwww merged 2 commits intoapache:mainfrom
yongwww merged 2 commits intoapache:mainfrom
Conversation
…nbind to relax conversion
yongwww
approved these changes
May 20, 2025
ShiboXing
pushed a commit
to ShiboXing/tvm
that referenced
this pull request
Aug 10, 2025
apache#17990) * [Relax][Frontend]Fix: Output tensor with zero dimension after torch.unbind to relax conversion * Fix: Output tensor with zero dimension after torch.unbind to relax conversion
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.
This PR is for issue: #17989. I've also updated tests/python/relax/test_frontend_from_exported_program.py accordingly.
tvm/python/tvm/relax/frontend/torch/base_fx_graph_translator.py
Line 1272 in 3db71bb
will cause the conversion to produce an extra tensor with a dimension of 0.