Poulpy Emitter - #3250
Conversation
|
Welcome to HEIR! Thank you for opening your first pull request! We appreciate you joining our community. Please note that our contributing policy) requires unrecognized users to meet a maintainer in a non-textual format before their first PR will be reviewed. If you have already met a maintainer, or you're sure the maintainers know who you are, you can safely ignore this message. Otherwise, a maintainer will likely close this PR shortly. Don't take it personally! Instead, we welcome you to attend one of our open meetings on our community calendar, schedule a dedicated call with a maintainer, or reach out in the We look forward to connecting with you! |
05c7749 to
8560b62
Compare
will do! |
61b0d9a to
e85648a
Compare
|
Please rebase and squash your changes and we can optimistically get it merged pending feedback from Jean-Philippe |
|
I went over the example, the emitted code looks good, assuming that hard-coded randomness was intentional. A future optimization would be to use the Also, just to avoid ambiguity, in Poulpy Galoiskeys are keyed by their signed Galois element. |
198c5fa to
bfc4dfa
Compare
I've squashed the commits. Also i left the randomness as is for now and added a comment so the emitter prints code that can be compiled at this stage. |
Step 3 (Implement Code Generation) from #3096.
Adds lib/Target/Poulpy/{PoulpyEmitter.h,.cpp,BUILD,PoulpyTemplates.h}
and registers the --emit-poulpy translation in heir-translate.
!poulpy.module argument types, type BE = ...; and derived type
aliases (Ct/Tsk/Akm)
argument list, Result return, zero/one-operand return handling
!poulpy.automorphism_key_map, and rank-0
memref<!poulpy.ciphertext> (&Ct/&mut Ct/Ct depending on position
and mutation)
values are written by a compute op in the function body
Rust allocation is synthesized at the first op that writes into
it, deriving its layout at runtime from a sibling operand
that would silently read uninitialized memory
rotate, rotate_assign
Adds tests/Emitter/Poulpy/{BUILD,emit_poulpy.mlir,
emit_poulpy_invalid_assign.mlir}. Output has also been verified with
cargo check against the real poulpy 0.7.0 crates, not just
pattern-matched.