lwe: add (optional) level and scale attributes to lwe.rlwe_encode - #3305
Conversation
|
The CI failure looks legit to me. |
Yep, looks like something broke when I cherry-picked it :( |
e508373 to
34a5d61
Compare
34a5d61 to
d13bf8e
Compare
j2kun
left a comment
There was a problem hiding this comment.
Can't the level be inferred from the result type of the encode op?
@j2kun Nope, unfortunately the info on the ptxt type isn't sufficient. In #3305 @ZenithalHourlyRate suggested also adding a ctxt space to the op as a solution, I instead picked this approach with an optional Attr when I needed it "just to make cheddar work" since its a lot lower-impact. In the meantime, @mdgrs is looking into actually doing smart encoding-target-level selection in general, so maybe it is now actually worth doing a "real" solution rather than the optional attr workaround? |
d13bf8e to
0b568d3
Compare
|
I'm fine with this approach, though I suspect we will also want a scale attribute so that plaintext encoding can target a specific scale. Can you add that as another optional attribute, then we can get this in. |
0b568d3 to
1c65637
Compare
lwe.rlwe_encodelwe.rlwe_encode
@j2kun done :) |
Preliminary for Cheddar work (where encoding a plaintext effectively requires knowing what level to encode it to, since the canonical scale is different for each level).