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
| materializeIfPending(dst, module, a, /*useSemanticWidth=*/false, | ||
| /*wrapUnnormalized=*/false); | ||
|
|
||
| os << variableNames->getNameForValue(module) << ".ckks_mul_into(" |
There was a problem hiding this comment.
It might be worth adding one or two templated emitBinaryOp/emitBinaryAssignOp helper functions to reduce some of the duplication among these printers.
will do! |
61b0d9a to
e85648a
Compare
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.