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

Incorrect stablehlo.and|or folder patterns in StablehloAggressiveSimplificationPatterns #2633

Open
christopherbate opened this issue Nov 21, 2024 · 0 comments

Comments

@christopherbate
Copy link
Contributor

christopherbate commented Nov 21, 2024

What happened?

There are two incorrect folders introduced in the last major overhaul to the simplification transforms:


def IntOne : AttrConstraint<
   CPred<"::mlir::matchPattern($_self, m_One())">, "is integer one">;


def : Pat<(StableHLO_AndOp $lhs, (StableHLO_ConstantOp:$one IntOne:$value)),
          (replaceWithValue $lhs)>;

....

def : Pat<(StableHLO_OrOp $lhs, (StableHLO_ConstantOp:$one IntOne:$value)),
          (replaceWithValue $one)>;

constraint IntOne should be replaced with something along the lines of IntAllOnes

will submit fix & tests later tonight or tomorrow

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

No branches or pull requests

1 participant