Lower CGGI operations on high level integers to LWE/PBS
- Dominant language
- MLIR
- Stars
- 906
- Forks
- 171
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 32
Description
The `--arith-to-cggi` pass lowers arithmetic operations on larger bit width integers to CGGI operations exposed by shortint / integer APIs. This is an alternative non-Yosys pass that can enable much faster compilation and execution than circuit booleanization.
For example, this would include `cggi.add`, `cggi.sub`, `cggi.mul` and bitwise operations like `cggi.xor` `cggi.and`.
This could belong in a pass like `--cggi-decompose-operations` to decompose higher level CGGI operations into scalar LWE ops and PBS ops that hardware accelerators can then schedule and execute.
In particular, starting with a `cggi.xor` operation assuming 2 bit messages and 2 bit carry space (so that LHS and RHS can be concatenated with scalar ops and then a 4-bit PBS can compute the XOR truth table) would be a great first step.
This would help enable a comparison between hardware accelerators and libraries for operations in AES transciphering.
cc @WoutLegiest @FlorentCLMichel
Filing this issue for tracking, beginners welcome here too. Will also be focusing on writing the rest of the AES kernels into a high level API friendly language to hook into this pass.
Contributor guide
Assessment
This issue has not been assessed yet.