Commit Graph

107 Commits

Author SHA1 Message Date
Quentin Bourgerie
1ffd480d07 cleanup(compiler/jit): Removing dead code since the preparation of arguments has been factorized thanks the EncryptedArguments 2022-03-24 11:00:36 +01:00
Quentin Bourgerie
0d1f041323 refactor(jit): Use PublicArguments instead of JitLambda::Argument to call the lambda (uniform calling to ServerLambda and JitLambda) 2022-03-24 11:00:36 +01:00
Quentin Bourgerie
e72101f5c7 fix(compiler): Delete target machine when no more in use (prevent leak in compilation) 2022-03-24 11:00:36 +01:00
Quentin Bourgerie
6aaaeb8d3f enhance(compiler): Update v0 parameters table, that enable 8 bits 2022-03-22 12:38:58 +01:00
Mayeul@Zama
73bb1c03d8 enhance(compiler): fix warnings
remove unused signature, functions, variable
remove pessimizing-moves
add cast before comparison
2022-03-15 18:14:35 +01:00
Mayeul@Zama
ca8d4fb110 feat(compiler): use engine concrete C API
remove ConcreteToConcreteCAPI and ConcreteUnparametrize passes
2022-03-15 18:14:35 +01:00
Mayeul@Zama
cee07d2440 fix: rename LweSecretKeyParam.size dimension 2022-03-15 18:14:35 +01:00
Antoniu Pop
8ee456315e fix(compiler): fix code generated for library header. 2022-02-28 21:00:48 +00:00
Antoniu Pop
ebb719cf60 fix(compiler): generate PIC code by default to allow generating shared libraries. 2022-02-28 21:00:48 +00:00
rudy
8b71e9d476 feat(Clientlib): separate client encryption and server computation
Resolve #200
2022-02-24 15:50:18 +01:00
youben11
e82360a9fe feat: support lowering of convolution end to end 2022-02-24 09:44:26 +01:00
Quentin Bourgerie
4e8a9d1077 enhance(runtime): Fix the runtime tools to handle the ciphertext bufferization and the new compiler concrete bufferized API 2022-02-17 15:53:23 +01:00
Quentin Bourgerie
8a9cce64e3 enhance(compiler): Add custom finalize bufferize pass to handle memref.tensor_load op 2022-02-17 15:53:23 +01:00
Quentin Bourgerie
626493dda7 enhance(compiler): Lower from Concrete to BConcrete and BConcrete to C API call 2022-02-17 15:53:23 +01:00
Quentin Bourgerie
3330b2f855 fix(compiler): Take care of program with no input when creating client parameters 2022-02-17 15:53:23 +01:00
Quentin Bourgerie
1f3944047f feature(compiler): Introduce the BConcrete Dialect 2022-02-17 15:53:23 +01:00
Antoniu Pop
dddad849c7 enhance(compiler): add --parallelize-loops and --parallelize-dataflow compile flags in addition to --parallelize which enables both. 2022-02-03 10:59:12 +00:00
Antoniu Pop
ec633d57f6 fix(compiler): predicate OpenMP loop parallelization of Linalg on the --parallelize flag. 2022-02-03 10:59:12 +00:00
Quentin Bourgerie
f52965e22f enhance(compiler): Lower linalg to parallel loops and instantiare parallel loops with openmp 2022-02-03 10:59:12 +00:00
youben11
71cccc6a89 fix(mac): add options for required libraries 2022-01-24 17:02:25 +00:00
youben11
faa0abea3e fix: use appropriate cmd for dynamic lib generation
macos and linux require a different cmd
2022-01-24 17:02:25 +00:00
youben11
2926ea6a5e fix: use appropriate type for optimizingTransformer func
the call does return an `std::function` and was being referenced using
an `llvm::function_ref`, which apparently with some optim on Mac was
referncing bad memory location
2022-01-24 17:02:25 +00:00
youben11
2009ee1c94 chore: changing ref to repo after its renaming
also formatting and update the check_license script to match that
2022-01-06 12:40:10 +01:00
Antoniu Pop
93835e0106 fix(runtime): move deallocation of key clones in context destructor. 2022-01-04 12:43:33 +01:00
Antoniu Pop
066a3d4e17 fix(runtime): remove strucutred binding as incompatible with C++ standard version. 2022-01-04 12:43:33 +01:00
Antoniu Pop
84f01f78d6 fix(runtime/DFR): create only one BSK clone per thread and deallocate. 2022-01-04 12:43:33 +01:00
rudy
b8bd38dd6c feat(compiler): Output client parameters when compile to a library
close #198
2022-01-03 17:57:16 +01:00
youben11
f1161f7f6d chore: formatting
Quick fix due to ordering of includes, had to add #include
<mlir/Transforms/DialectConversion.h> to include/concretelang/Conversion/Utils/GenericOpTypeConversionPattern.h
2022-01-03 09:29:19 +01:00
youben11
940cb96be4 chore: rename dialects
HLFHE to FHE
MidLFHE to TFHE
LowLFHE to Concrete
2021-12-29 15:13:34 +01:00
youben11
e73291abdc chore: rename compiler to concrete-compiler
zamalang => concretelang
zamacompiler => concretecompiler
2021-12-29 15:13:34 +01:00
youben11
971cb56182 chore: licensing 2021-12-29 15:13:34 +01:00
rudy
d8fee32cea feat(HLFHELinalg): add apply_mapped_table_lookup
Resolves #182
2021-12-27 15:34:33 +01:00
Antoniu Pop
cdca7ca6f7 feat(compiler): add Dataflow/RT dialect and code generation for dataflow auto parallelization. 2021-12-23 15:57:53 +00:00
Quentin Bourgerie
db683f4a0e feat(compiler/runtime): Introduce a RT dialect 2021-12-23 15:57:53 +00:00
rudy
7a286ba9f9 fix(KeySetCache): handle concurrent generation
Resolves #305
2021-12-20 10:07:48 +01:00
Andi Drebes
f319ba37d2 feat(compiler): Integrate HLFHELinalg tiling passes into compilation pipeline 2021-12-17 16:09:59 +01:00
Andi Drebes
16d0502f56 fix(compiler): Initialize strides of memref parameters when JIT-invoking a function
Upon invocation of a function with memref arguments, the strides for
all dimensions are currently set to 0. This causes dynamic offsets to
be calculated incorrectly in the function body.

This patch replaces the placeholder values with the actual strides for
each dimension and adds a test with parametric slice extraction from a
tensor that triggers dynamic indexing.
2021-12-13 15:20:54 +01:00
youben11
0a7ac76b10 fix: move unique_ptr<T> to be converted to llvm::Expected
gcc 6.3 was complaining about not being able to wrap it in an
llvm::Expected
2021-12-08 17:59:53 +01:00
rudy
74d52cb649 fix(clang): remove an error reported by clang 2021-12-08 11:31:23 +01:00
youben11
58f385b11b fix: move CompilationResult in return
old toolchain (gcc 6.x) was complaining about not being able to convert
CompilationResult to Expected<CompilationResult>
2021-12-07 16:14:44 +01:00
rudy
cc58608589 chore(Lambda): simplify, extract, enhance message for bit width rounding
bit with rounding: 5bit element is widen to a standard 8bit word
2021-12-07 15:29:05 +01:00
rudy
209463be22 chore(Lambda): simplify and extract null parameter detection 2021-12-07 15:29:05 +01:00
rudy
2c56a26c75 fix(Lambda): missing superfluous check in setArg
[----------] Global test environment tear-down
[==========] 7 tests from 1 test suite ran. (1513 ms total)
[  PASSED  ] 7 tests.

  YOU HAVE 2 DISABLED TESTS
2021-12-07 15:29:05 +01:00
rudy
47b4b667bb fix(Lambda): #253 fix the bug about Lambda parameter number verification
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1513 ms total)
[  PASSED  ] 6 tests.

  YOU HAVE 3 DISABLED TESTS

Compared to previous commit, a fatal test is disabled
2021-12-07 15:29:05 +01:00
rudy
9a09afaa80 bug(Lambda): #253 reactivate the bug about Lambda parameter number verification
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1327 ms total)
[  PASSED  ] 5 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Lambda_check_param.scalar_tensor_to_tensor_good_number_param

 1 FAILED TEST
  YOU HAVE 3 DISABLED TESTS
2021-12-07 15:29:05 +01:00
Mayeul@Zama
dad4390518 feat(compiler): add a key cache 2021-12-07 12:11:56 +01:00
Mayeul@Zama
f193fd71a2 fix(compiler): fix mixed-up (g)lwe dimension/size
add dimension -> size conversion
rename k -> glweDimension, polynomialSize -> logPolynomialSize
remove (in/out)putLweSize from KeySwitchLweOp
remove GlweSizeType from LowLFHE
2021-12-07 12:11:56 +01:00
Quentin Bourgerie
fb58dcc59d enhance(compiler/lowlfhe): Give the runtime context as function argument instead of a global variable (close #195) 2021-12-02 10:56:47 +01:00
rudy
975ee86a5e feat(compiler): add --compile option
Resolves #196
2021-11-30 17:42:28 +01:00
rudy
ddca6840f1 fix(CompilerEngine): include mlir diagnostic in error message
Resolves #288

example
before:
Failed to lower to LLVM dialect

after:
Failed to lower to LLVM dialect
test.mlir:3:10: error: unexpected error: 'linalg.copy' op expected indexing_map #1 to have 2 dim(s) to match the number of loops
    %0 = tensor.extract_slice %arg0[0, 0] [3, 1] [1, 1] : tensor<3x2x!HLFHE.eint<3>> to tensor<3x!HLFHE.eint<3>>
         ^
2021-11-29 17:15:46 +01:00