Closed j2kun closed 5 months ago
This issue has 1 outstanding TODOs:
This comment was autogenerated by todo-backlinks
Hey @j2kun, I would be interested in contributing to the project. Would this still be an applicable issue? Having skimmed through the most recent meeting, is there a more helpful issue to work on with respect to the bgv -> poly -> pipeline? Thanks
Hi @inbelic, thanks for taking an interest!
This issue is definitely still open. @AlexanderViand-Intel is doing some work on the polynomial side of the house right now, but otherwise I'd say that part of the codebase is rather under-developed. I will try to file some additional issues that could constitute low-hanging fruit here, and tag them with the polynomial dialect label.
I think the main thrust that is relevant to FHE would be supporting special lowerings for particularly-structured polynomial rings, like (Z/qZ)[x] / (x^N + 1)
, as well as incorporating NTT/FFT operations and passes to identify when to switch to and from the NTT/FFT domain.
Hi @inbelic! Yes, there's lots to do around polynomial
. I did some infrastructure work last week to make the existing bgv->poly lowerings work with the existing poly->standard lowering and now the next point on my agenda is to extend the bgv->poly lowerings (which currently only have add and mul) to support noise management, i.e., mod switching and key switching (specifically, relinearization).
However, with the current poly -> standard lowerings (which support a wide set of polynomial rings generically) the code generated would likely be prohibitively slow to run 🐌. So, as Jeremy said, a more HE-optimized lowering (like what was done in HEaaN.MLIR) is indeed the next big thing for poly
.
Awesome! I already see some of the new issues you created. I will begin digging into them this week and start with this one.
I pushed my current work towards an implementation in the above pull request. Unfortunately, I have come across a lowering issue that I haven't been able to resolve and would appreciate some help or pointers. Thanks!
Edit: Comment linked here: https://github.com/google/heir/pull/545#issuecomment-2016015585
See TODO linking to this issue in
PolyToStandard.cpp