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

[CINN] Add Div to replace Recipical in DimExpr #70970

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Jan 24, 2025

PR Category

CINN

PR Types

New features

Description

Pcard-67164
Add Div to replace Recipical in DimExpr

添加关于 Div 的化简

  1. Div(S0, 1) => S0, Div(0, S0) => 0
  2. 分子分母的约分
  • Div(Mul(S1, S2, S3), S1) => Mul(S1, S2)
  • Div(Mul(S1, 8), 6) => Div(Mul(S1, 4), 3)

Mul 的常量折叠不再考虑分式结构,删除分式结构

删除原本 Mul(S0, Reciprocal(S0)) 的消除

TODO

  • 优化 SimplifyDiv 中重复代码

Others

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