heir icon indicating copy to clipboard operation
heir copied to clipboard

Port HeLayers to HEIR

Open edwjchen opened this issue 1 year ago • 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.

edwjchen avatar Mar 04 '24 17:03 edwjchen

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.

j2kun avatar Mar 05 '24 01:03 j2kun