-
Notifications
You must be signed in to change notification settings - Fork 76
frontend: support conditionals as scf.if statements #1571
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Asra Ali <[email protected]>
Signed-off-by: Asra Ali <[email protected]>
Signed-off-by: Asra Ali <[email protected]>
import ipdb | ||
|
||
ipdb.set_trace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import ipdb | |
ipdb.set_trace() |
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
Now that we have polynomial evaluation, a lowering for CMP (see #827) should be doable, but we won't be able to run such code in OpenFHE, as it's only feasible for small plaintext moduli which OpenFHE does not (afaik) do. |
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
Why not use the comparison work from Jelle Vos's paper #920 ? I finally got a chance to read in on the flight to HES and it gives comparison kernels in terms of polynomial evaluation. |
edit: sorry misclick |
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
Good point! The comparison issue predates Jelle's paper by just a few days but I guess it should be updated |
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per google#1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes google#1619 This is actually a part of google#1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per google#1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes google#1619 This is actually a part of google#1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 740397951
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
This stress tests data dependent conditionals lowering all the way to openfhe and translated. I had to modify * fixing subplain's operand ordering per #1619 * heir-translate emitting boolean types * heir-translate allowing extui for boolean extension to avoid canonicalizing arith constant = true -> extui to i64 as a -1 Fixes #1619 This is actually a part of #1571 :P PiperOrigin-RevId: 743164460
TODO: the rlwe pipeline doesn't allow for arith.cmpi so I need some other way of lowering it