Repository navigation
Conversation
…extract_slice Fixes google#2921
j2kun
commented
Nov 2, 2026
| %y = polynomial.apply_coefficientwise (%xsq : !poly_ty_2) { | ||
| ^body(%coeff: !rns.rns<!Zq0, !Zq1>, %degree: index): | ||
| %reduced = rns.extract_slice %coeff <start = 0, size = 1> : !rns.rns<!Zq0, !Zq1> -> !rns.rns<!Zq0> | ||
| %reduced = rns.convert_basis %coeff <{targetBasis = !rns.rns<!Zq0>}> : !rns.rns<!Zq0, !Zq1> -> !rns.rns<!Zq0> |
Collaborator
Author
There was a problem hiding this comment.
Because this PR makes polynomial extract_slice no longer require coefficient form, we needed a new op here that does require coefficient form to preserve the tested functionality.
Collaborator
Author
|
Actually, I'm going to close this because polynomial.extract_slice is strictly more general than apply_coefficientwise + rns.extract_slice: apply_coefficientwise should force a coefficient form, but then that prevents one from slicing RNS limbs in eval form. This PR hacks around that my allowing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2921