heir icon indicating copy to clipboard operation
heir copied to clipboard

bgv: add lowering to openfhe

Open Maokami opened this issue 1 year ago • 1 comments

BGV to Openfhe

The BGV dialect will be pretty close to Openfhe, but since it will lower to other library dialects, we would ideally want to know the least common denominator of BGV library APIs. I don't know exactly what that is, but I am also comfortable with that boundary evolving as we add more libraries.

Originally posted by @j2kun in https://github.com/google/heir/issues/328#issuecomment-1898975618

Maokami avatar Jan 22 '24 09:01 Maokami

The major challenge with different flavors of BGV will probably be the noise management, which is quite different between different implementations. HElib has some kind of "dynamic noise estimate" going on, and I think the BGV implementation in SEAL uses the same approach. OpenFHE, on the other hand, supports (potentially in addition to the dynamic approach) an easier-to-use version of BGV where all you need to know is depth + max number of additions/etc between multiplications.

However, I guess this isn't actually a major concern for the BGV-> library lowerings, as we can just assume that if someone lowers something using them, they already ensured that the BGV instructions are "valid" w.r.t noise as implemented in the library.

AlexanderViand-Intel avatar Jan 22 '24 17:01 AlexanderViand-Intel