Files
concrete/compiler
Andi Drebes 6fb907295d feat(compiler): Add lowering for HLFHELinalg.zero to linalg.generate
Add a rewrite pattern that transforms an instance of
`HLFHELinalg.zero` into an instance of `linalg.generate` with an
appropriate region yielding a zero value.

Example:

  %out = "HLFHELinalg.zero"() : () -> tensor<MxNx!HLFHE.eint<p>>

becomes:

  %0 = tensor.generate   {
    ^bb0(%arg2: index, %arg3: index):
       %zero = "HLFHE.zero"() : () -> !HLFHE.eint<p>
       tensor.yield %zero : !HLFHE.eint<p>
  } : tensor<MxNx!HLFHE.eint<p>>
2021-12-01 11:24:27 +01:00
..
2021-11-30 17:42:28 +01:00
2021-06-04 09:18:14 +02:00
2021-05-28 12:08:41 +02:00
2021-11-30 17:42:28 +01:00

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-initialized

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