Skip to content

Add RNSPolynomial attribute and internal representation#3120

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_932447310
Open

Add RNSPolynomial attribute and internal representation#3120
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_932447310

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Add RNSPolynomial attribute and internal representation

This is intended to be used for constant folding for the polynomial dialect. To keep this change small, lowering a polynomial.constant with an RNSPolynomialAttr will gracefully fail.

@j2kun j2kun requested review from crockeea and removed request for crockeea June 24, 2026 21:10
@copybara-service copybara-service Bot force-pushed the test_932447310 branch 2 times, most recently from 570602a to 642c295 Compare June 24, 2026 21:57
@j2kun j2kun requested a review from crockeea June 24, 2026 22:01
@j2kun

j2kun commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

I was a bit uncertain about this change, at least in that it hard-codes the ring modulus as x^N + 1 for this attribute. I feel that's bad for generality, but that it will be a while before we have to revisit this.

This is intended to be used for constant folding for the polynomial dialect. To keep this change small, lowering a polynomial.constant with an RNSPolynomialAttr will gracefully fail.

PiperOrigin-RevId: 932447310
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.

1 participant