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

simplifier scalar tensor shape to scalar i32 #1310

Merged
merged 3 commits into from
Aug 6, 2024
Merged

Conversation

Yancey1989
Copy link
Collaborator

No description provided.

} else if (isa<mhlo::DivOp>(op)) {
newOpValue = rewriter.create<arith::DivSIOp>(loc, v1, v2).getResult();
} else {
return failure();
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: just skip this op or fail this pass?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Failure is better, let's rewrite MHLO operations using arithmetic operations to compute scalar values.

Copy link
Collaborator

@qiuxiafei qiuxiafei left a comment

Choose a reason for hiding this comment

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

LGTM with minor comment.

@Yancey1989 Yancey1989 merged commit fbe39bc into main Aug 6, 2024
11 checks passed
@Yancey1989 Yancey1989 deleted the extract_simplifier branch August 6, 2024 03:09
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