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

add a ModArith constant op #1100

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

j2kun
Copy link
Collaborator

@j2kun j2kun commented Nov 19, 2024

This custom-parsed op and attribute make it relatively easy to systematically change an arith.constant op to mod_arith:

    arith.constant 17 : i32

-->

mod_arith.constant 17 : !mod_arith.mod_arith<234 : i32>

Cherry-picked from #1096 so it works well with the polynomial coefficient type migration

Copy link
Collaborator

@AlexanderViand-Intel AlexanderViand-Intel left a comment

Choose a reason for hiding this comment

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

LGTM!

lib/Dialect/ModArith/IR/ModArithTypes.td Outdated Show resolved Hide resolved
This custom-parsed op and attribute make it relatively easy to
systematically change an `arith.constant` op to `mod_arith`:

```
    arith.constant 17 : i32

-->

mod_arith.constant 17 : !mod_arith.mod_arith<234 : i32>
```

- comment on getValue nightmare
- mod_arith.mod_arith -> mod_arith.int
@j2kun j2kun added the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label Nov 19, 2024
@j2kun
Copy link
Collaborator Author

j2kun commented Nov 19, 2024

Fixes applied.

@copybara-service copybara-service bot merged commit 17b26fc into google:main Nov 19, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants