Hecate (Homomorphic Encryption Compiler for Approximate TEnsor computation) is an optimizing compiler for the CKKS FHE scheme, built by Compiler Optimization Research Laboratory (Corelab) @ Yonsei University. Hecate is built on the top of Multi-Level Intermediate Representation (MLIR) compiler framework. We aim to support privacy-preserving machine learning and deep learning applications.
Ninja
git
cmake >= 3.22.1
python >= 3.10
clang,clang++ >= 14.0.0
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
git checkout llvmorg-16.0.0
cmake -GNinja -Bbuild \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_PROJECTS=mlir -DLLVM_INSTALL_UTILS=ON \
-DLLVM_TARGETS_TO_BUILD=host \
llvm
cmake --build build
sudo cmake --install build
cd ..
git clone https://github.com/llvm/llvm-project.git
cd llvm-project
git checkout llvmorg-16.0.0
cmake -GNinja -Bbuild \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release\
-DLLVM_ENABLE_PROJECTS=mlir -DLLVM_INSTALL_UTILS=ON \
-DLLVM_TARGETS_TO_BUILD=host -DCMAKE_INSTALL_PREFIX=<MLIR_INSTALL>\
llvm
cmake --build build
sudo cmake --install build
cd ..
git clone https://github.com/microsoft/SEAL.git
cd SEAL
git checkout 4.0.0
cmake -S . -B build
cmake --build build
sudo cmake --install build
cd ..
git clone https://github.com/microsoft/SEAL.git
cd SEAL
git checkout 4.0.0
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=<SEAL_INSTALL>
cmake --build build
sudo cmake --install build
cd ..
git clone <this-repository>
cd <this-repository>
cmake -S . -B build
cmake --build build
git clone <this-repository>
cd <this-repository>
cmake -S . -B build -DMLIR_ROOT=<MLIR_INSTALL> -DSEAL_ROOT=<SEAL_INSTALL>
cmake --build build
python3 -m venv .venv
source .venv/bin/activate
source config.sh
pip install -r requirements.txt
./install.sh
hc-trace <example-name>
e.g.,
hc-trace MLP
hopts <eva|elasm> <waterline:integer> <example-name>
e.g.,
hopts elasm 30 MLP
hc-test <eva|elasm> <waterline:integer> <example-name>
e.g.,
hc-test elasm 30 MLP
This command will print like this:
1.810851535
9.63624118628367e-06
The first line shows the wall-clock time for FHE execution
The second line shows the RMS of the resulting error
hcot <eva|elasm> <waterline:integer> <example-name>
With printing pass timings :
hcott <eva|elasm> <waterline:integer> <example-name>
ELASM: Error-Latency-Aware Scale Management for Fully Homomorphic Encryption [abstract]
Yongwoo Lee, Seonyoung Cheon, Dongkwan Kim, Dongyoon Lee, and Hanjun Kim
32nd USENIX Security Symposium (USENIX Security), August 2023.
[Prepublication]
HECATE: Performance-Aware Scale Optimization for Homomorphic Encryption Compiler[IEEE Xplore]
Yongwoo Lee, Seonyeong Heo, Seonyoung Cheon, Shinnung Jeong, Changsu Kim, Eunkyung Kim, Dongyoon Lee, and Hanjun Kim
Proceedings of the 2022 International Symposium on Code Generation and Optimization (CGO), April 2022.
[Prepublication]
@INPROCEEDINGS{lee:hecate:cgo,
author={Lee, Yongwoo and Heo, Seonyeong and Cheon, Seonyoung and Jeong, Shinnung and Kim, Changsu and Kim, Eunkyung and Lee, Dongyoon and Kim, Hanjun},
booktitle={2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)},
title={HECATE: Performance-Aware Scale Optimization for Homomorphic Encryption Compiler},
year={2022},
volume={},
number={},
pages={193-204},
doi={10.1109/CGO53902.2022.9741265}}
@INPROCEEDINGS{lee:elasm:sec,
title={{ELASM}: Error-Latency-Aware Scale Management for Fully Homomorphic Encryption},
author={Lee, Yongwoo and Cheon, Seonyoung and Kim, Dongkwan and Lee, Dongyoon and Kim, Hanjun},
booktitle={{32nd} USENIX Security Symposium (USENIX Security 23)},
year={2023},
address = {Aneheim, CA},
publisher = {USENIX Association},
month = aug
}