heir icon indicating copy to clipboard operation
heir copied to clipboard

Add rlwe plain ops

Open johnbntn opened this issue 7 months ago • 5 comments

Added lwe ciphertext-plaintext ops and their lowerings for bgv/ckks (#1603)

For some reason when I was adding bgv/ckks-to-openfhe tests I continued to fail them even though my test log showed the expected output. When I added -dump-input=help as a FileCheck flag they passed. Has anyone else ever seen this behavior?

Also I can't fully test the lwe-to-polynomial lowering until #1199 but I did my best to add the functionality and tests.

johnbntn avatar Apr 30 '25 15:04 johnbntn

For some reason when I was adding bgv/ckks-to-openfhe tests I continued to fail them even though my test log showed the expected output. When I added -dump-input=help as a FileCheck flag they passed. Has anyone else ever seen this behavior?

No, it should mean the CHECK directive you wrote does not match the input.

Also, according to https://llvm.org/docs/CommandGuide/FileCheck.html#cmdoption-FileCheck-dump-input, -dump-input=help means Explain input dump and quit, so it should not fail. And bazel test asserts PASSED or not by checking the return value of executable, so you will always get a PASSED with such flag.

ZenithalHourlyRate avatar May 01 '25 06:05 ZenithalHourlyRate

I think I added all of the requested changes:

  • Removed underscore in op names
  • Added canonicalizers for add/mul plain
  • Simplified the poly lowering
  • Fixed the openfhe lowering tests by pattern matching just the plaintext instead of the plaintext and return types
  • Added some more tests for orderings and canonicalizers

Please let me know if I missed anything or if you have any more requested changes

johnbntn avatar May 02 '25 04:05 johnbntn

Also remember to squash the commits so that the PR merge tool can pick it up.

ZenithalHourlyRate avatar May 02 '25 07:05 ZenithalHourlyRate

I believe I finished making all of the requested changes but please let me know if I missed anything.

johnbntn avatar May 14 '25 18:05 johnbntn

I believe I finished making all of the requested changes but please let me know if I missed anything.

Due to our strange project setup in re Google, you also need to squash your commits before we can merge it.

j2kun avatar May 14 '25 18:05 j2kun