openfhe: determine if openfhe types should denote const/non-const in the IR
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
Openfhe uses both ConstCiphertext and Ciphertext types in the library - e.g. in place operations require mutable ciphertexts.
Currently, we emit code where CiphertextT is aliased for a const type https://github.com/google/heir/blob/73a4ca46958286c033f32db1120b46286efbf103/lib/Target/OpenFhePke/OpenFhePkeTemplates.h#L23
In the case where we emit a loop evaluation, we specially emit a MutableCiphertextT type.
But to make alloc-in-place work well for openfhe C++ code emission, we may want to include that info directly into the IR when alloc-in-place runs its transforms, and have in place openfhe operations take in non-const ciphertext types. That would make code emission more straightforward.
See https://github.com/google/heir/pull/2471
Contributor guide
Assessment
This issue has not been assessed yet.