mirror of
https://github.com/zama-ai/concrete.git
synced 2026-04-17 03:00:54 -04:00
When determining the maximum MANP and precision, the `MaxMANPPass` only takes into account results generated by an operation, but ignores function parameters. However, encrypted function parameters are assumed to have a MANP value of 1 and can have an arbitrary precision. This patch takes into account function arguments by using their default MANP values and the extracting their precision.
Building the compiler
Install MLIR following https://mlir.llvm.org/getting_started/ Use commit c2415d67a564
Install pybind11:
pip install pybind11
Build concrete library:
git clone https://github.com/zama-ai/concrete
cd concrete
git checkout feature/core_c_api
cd concrete-ffi
RUSTFLAGS="-C target-cpu=native" cargo build --release
Generate the compiler build system, in the build directory
export LLVM_PROJECT="PATH_TO_LLVM_PROJECT"
export CONCRETE_PROJECT="PATH_TO_CONCRETE_PROJECT"
make build
Build the compiler
make zamacompiler
Test the compiler
#TODO: let cmake set this PATH
export LD_LIBRARY_PATH="path_to_homomorphizer/compiler/build/lib/Runtime/"
make test
Run the compiler
./build/src/zamacompiler