google/heir

Port HeLayers to HEIR

Opened this issue · 1 comments

HeLayers is a vectorizing system that supports transforming Tensorflow and PyTorch programs to FHE libraries (e.g. Lattigo, OpenFHE). The system uses a TileTensor abstraction to quickly search the packing space for tensor programs.

An overview of their system is here: https://ibm.github.io/helayers/user/overview.html.
The full paper is here.

Love the idea. I'm not intimately familiar with the details of their work, but it seems like the first step would be to encode the tile tensor notation in the IR. We will likely need to implement a custom data structure to represent the options like replication, unknown values, and interleaving from section 4.

We might be able to get away with using the built-in tensor dialect, using the attribute to store the tile-tensor packing, but it seems risky to me because the existing lowerings and passes will not respect it.