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

TorchToTosa: Correctly lower pow with broadcasting #411

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

mgehre-amd
Copy link
Collaborator

We used to insert an invalid tosa.cast %1: tensor<f32> -> tensor<1x1x1xf32> when the torch.pow had broadcasting semantics.
This PR strengthens the check to ensure that we only cast if the element types differ.

@mgehre-amd mgehre-amd requested a review from jorickert December 11, 2024 00:31
@mgehre-amd mgehre-amd removed the request for review from jorickert December 11, 2024 16:40
lib/Conversion/TorchToTosa/TorchToTosa.cpp Outdated Show resolved Hide resolved
@mgehre-amd mgehre-amd enabled auto-merge December 12, 2024 08:02
@mgehre-amd mgehre-amd merged commit 2341f20 into feature/backport_ea1_ops Dec 12, 2024
4 checks passed
@mgehre-amd mgehre-amd deleted the matthias.fix_tosa_pow branch December 12, 2024 08:26
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