You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add elementwise mappable variation for rlwe_encode
This change adds a new ElementwiseByOperandOpInterface method that allows an op to specify which dimensions of a tensor-typed operand should be mapped over. This is necessary to support having an elementwise op like lwe.rlwe_encode, whose input is a tensor<k x slots> and whose output is a tensor<k x lwe.lwe_plaintext<...>>. This is needed in turn because server-side secret.conceal lowers to an elementwise trivial_encrypt, which lowers to an elementwise encode + encrypt.
The verifier is updated to ensure that the "mapped shape" (subset of dimensions specified by the interface as mappable) aligns across operands and the output.
Then the ElementwiseToAffine pass is updated to use this interface to support lwe.rlwe_encode.
PiperOrigin-RevId: 888110533
0 commit comments