Split --<scheme>-to-lwe
into "trivial/common" and "real" lowering parts
#1193
Labels
dialect: bgv
Issues concerning the bgv dialect
dialect: ckks
Issues related to the CKKS dialect
dialect: lwe
Issues about the LWE dialect
In my
--<scheme>-to-openfhe
to--lwe-to-openfhe
merger (PR #1196), I'm using--<scheme>-to-lwe
in its current form to lower only the "common" operations we already have in thelwe
dialect (e.g., add, mul, etc.) to reduce the amount of scheme specific ops that the openFHE pipeline needs to deal with. The current form of this pass leaves many operations (e.g.,<scheme>.rotate
,bgv.mod_switch
, etc) unmodified, which is fine for the OpenFHE pipeline.However, we will eventually want to extend
--<scheme>-to-lwe
to declare all<scheme>
ops illegal and lower such operations tolwe
(necessary for lowering topolynomial
). There's a good chance that this lowering will be directly to "building blocks", e.g., arotate
might lower to an explicit permutation/automorphism + keyswitch operation, rather thanlwe.rotate
. As a result, the output of this extended pass would no longer be suitable for the OpenFHE piepeline.This issue exists as a reminder to turn
--<scheme>-to-lwe
into a pipeline with two passes: first, a--<scheme>-common-to-lwe
pass with the current behavior that lowers only trivial/common ops, and a--<scheme>-specific-to-lwe
pass that lowers the remaining ops, potentially "below" the library backend abstraction level.The text was updated successfully, but these errors were encountered: