HEIR (High-level Intermediate Representation) is an MLIR-based compiler infrastructure for FHE that targets multiple backends. Supporting squid as a HEIR backend would allow programs compiled through HEIR's toolchain to emit squid-compatible Rust code, significantly expanding squid's reach to users coming from the compiler side of the FHE ecosystem.
Since squid wraps Poulpy, this would indirectly bring Poulpy's bivariate representation and performance advantages into the HEIR ecosystem, which currently has no backend leveraging that approach.
This is an early-stage idea. Before any implementation work, it's worth investigating:
- What HEIR's backend interface requires (codegen target, type mappings, op coverage)
- Whether squid's current op set is sufficient to cover HEIR's emittable operations
- Whether this should live in squid itself or as a separate squid-heir crate
Good starting points:
- HEIR backend docs: https://heir.dev/
- HEIR existing backends for reference:
tfhe-rs, openfhe
Contributions welcome — even just a feasibility report in the comments would be valuable.
HEIR (High-level Intermediate Representation) is an MLIR-based compiler infrastructure for FHE that targets multiple backends. Supporting squid as a HEIR backend would allow programs compiled through HEIR's toolchain to emit squid-compatible Rust code, significantly expanding squid's reach to users coming from the compiler side of the FHE ecosystem.
Since squid wraps Poulpy, this would indirectly bring Poulpy's bivariate representation and performance advantages into the HEIR ecosystem, which currently has no backend leveraging that approach.
This is an early-stage idea. Before any implementation work, it's worth investigating:
Good starting points:
tfhe-rs,openfheContributions welcome — even just a feasibility report in the comments would be valuable.