Skip to content

Conversation

@hariprasadravi
Copy link

The lowering for torch.aten.empty.memory_format produces a non-conformant tosa.const when the output !torch.vtensor has a zero-sized dimension. This fix detects this case and reports a failure, preventing the generation of invalid IR. This issue was first observed in the SAM2 image predictor model.

@hariprasadravi
Copy link
Author

hariprasadravi commented Oct 23, 2025

@sahas3 @Hanumanth04 Can you take a look and necessary reviewers?

@sahas3 sahas3 requested review from sahas3 and sjarus October 23, 2025 20:41
… receives a tensor with a dimension of size zero
@hariprasadravi hariprasadravi force-pushed the fixEmptyMemoryFormatUpstream branch from dad20ea to f32a4e6 Compare October 27, 2025 18:49
@Hanumanth04
Copy link
Contributor

LGTM. Thanks for making this change, Hari.

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