Commit Graph

70 Commits

Author SHA1 Message Date
Quentin Bourgerie
d934553950 feat(compiler/gpu): Integrate gpu crypto optimization 2022-10-20 10:36:32 +01:00
youben11
ef778ac75b refactor: replace some operands by attrs in bs/ks 2022-10-20 10:36:32 +01:00
youben11
7cd45d1514 test: add GPU end2end tests 2022-10-20 10:36:32 +01:00
youben11
a7a65025ff refactor: redesign GPU support
- unify CPU and GPU bootstrapping operations
- remove operations to build GLWE from table: this is now done in
  wrapper functions
- remove GPU memory management operations: done in wrappers now, but we
  will have to think about how to deal with it later in MLIR
2022-10-20 10:36:32 +01:00
youben11
d169a27fc0 feat: support GPU (bootstrapping) 2022-10-20 10:36:32 +01:00
Antoniu Pop
4fbb05e18c feat(compiler): add an asynchronous interface for bootstrap and keyswitch using std::promise/future. 2022-09-19 13:02:20 +01:00
Quentin Bourgerie
f4673e8276 feat(compiler): First draft or compilation feedback 2022-09-14 10:03:25 +02:00
Ayoub Benaissa
393d1617eb fix: add linking options for MacOS
Starting from Mac 11 (Big Sur), it appears we need to add -L
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -lSystem for the
sharedlib to link properly.i
2022-08-26 10:45:15 +01:00
Quentin Bourgerie
5492ed01eb feat: plug the compiler pipeline with the optimizer for 16 bits eint 2022-08-16 08:40:14 +02:00
Quentin Bourgerie
8cd3a3a599 feat(compiler): First draft to support FHE.eint up to 16bits
For now what it works are only levelled ops with user parameters. (take a look to the tests)

Done:
- Add parameters to the fhe parameters to support CRT-based large integers
- Add command line options and tests options to allows the user to give those new parameters
- Update the dialects and pipeline to handle new fhe parameters for CRT-based large integers
- Update the client parameters and the client library to handle the CRT-based large integers

Todo:
- Plug the optimizer to compute the CRT-based large interger parameters
- Plug the pbs for the CRT-based large integer
2022-08-12 16:35:11 +02:00
rudy
cc6c2576ec feat(optimizer): create optimizer dag and use it 2022-08-11 10:10:27 +02:00
Antoniu Pop
eeb3ba8735 fix(compiler): add calls to enable either or both parts of the runtime based on compile options used. 2022-08-04 17:06:09 +01:00
Antoniu Pop
460fbabbe0 feat(runtime): deactivate main wrapping by default and add explicit initialization/termination. 2022-08-04 17:06:09 +01:00
Andi Drebes
85ebc0cb7a Rebase onto llvm-project 3f81841474fe with patch for arbitrary types in linalg named ops
Rebase to llvm-project at 3f81841474fe with a pending upstream patch
for arbitrary element types in linalg named operations.

Co-authored-by: Ayoub Benaissa <ayoub.benaissa@zama.ai>
2022-07-27 22:45:38 +02:00
Quentin Bourgerie
511bcd99e7 Revert "feat(optimizer): create optimizer dag and use it"
This reverts commit 0b99f6d278.
2022-07-27 18:35:47 +02:00
rudy
0b99f6d278 feat(optimizer): create optimizer dag and use it 2022-07-25 21:06:14 +02:00
youben11
f4166a4973 docs: use consistent style for comment blocks
prefix comment blocks with ///
2022-07-07 16:11:19 +01:00
Quentin Bourgerie
2de76e9c4e fix(compiler): Fix tfhe global parametrization to handle k>1
Co-authored-by: Mayeul@Zama <mayeul.debellabre@zama.ai>
2022-06-24 15:35:51 +02:00
Andi Drebes
45577fb79e Rebase onto llvm-project f69328049e9e with local changes
This commit rebases the compiler onto commit f69328049e9e from
llvm-project.

Changes:

* Use of the one-shot bufferizer for improved memory management

* A new pass `OneShotBufferizeDPSWrapper` that converts functions
  returning tensors to destination-passing-style as required by the
  one-shot bufferizer

* A new pass `LinalgGenericOpWithTensorsToLoopsPass` that converts
  `linalg.generic` operations with value semantics to loop nests

* Rebase onto a fork of llvm-project at f69328049e9e with local
  modifications to enable bufferization of `linalg.generic` operations
  with value semantics

* Workaround for the absence of type propagation after type conversion
  via extra patterns in all dialect conversion passes

* Printer, parser and verifier definitions moved from inline
  declarations in ODS to the respective source files as required by
  upstream changes

* New tests for functions with a large number of inputs

* Increase the number of allowed task inputs as required by new tests

* Use upstream function `mlir_configure_python_dev_packages()` to
  locate Python development files for compatibility with various CMake
  versions

Co-authored-by: Quentin Bourgerie <quentin.bourgerie@zama.ai>
Co-authored-by: Ayoub Benaissa <ayoub.benaissa@zama.ai>
Co-authored-by: Antoniu Pop <antoniu.pop@zama.ai>
2022-06-14 14:35:25 +02:00
youben11
1354759884 chore: rename refs to main branch 2022-06-09 09:19:06 +01:00
youben11
5636342097 feat: add option to enable/disable optimization 2022-06-01 14:35:12 +01:00
youben11
8d0f20390c feat: optimize concrete mul with constant values 2022-06-01 14:35:12 +01:00
Quentin Bourgerie
6bb1e05658 fix(compiler): Compiler // options are badly setted 2022-05-23 13:53:23 +02:00
youben11
211241fcb2 refactor: store compil artifacts under a single dir 2022-05-09 16:18:21 +01:00
youben11
f223f02ab7 feat: parameterize artifact generation in lib compilation 2022-05-09 16:18:21 +01:00
rudy
1b70a38754 feat(optimizer): expose the p_error parameter
simplify the handling of options by relying more on CompilationOptions
2022-05-06 13:06:08 +02:00
rudy
923a1b58e1 feat(optimizer): plug online parameter estimation 2022-04-29 15:11:42 +02:00
youben11
af300055a7 fix(macos): update dependency after compiling dylib
when dellocate is used to include dependencies in python wheels, the
runtime library will have an id that is prefixed with /DLC, and that path
doesn't exist. So when generated libraries won't be able to find it
during load time. To solve this, we change the dep in the generated
library to be relative to the rpath which should be set correctly during
linking. This shouldn't have an impact when /DLC/concrete/.dylibs/* isn't
a dependecy in the first place (when not using python).

also set rpath when linking to RT lib
2022-04-12 13:56:18 +01:00
youben11
fafaa4c870 fix(macos): ignore undefined symbols for JIT compilation 2022-04-06 08:43:44 +01:00
youben11
2ded4b6f43 fix: set rpath when linking using extra args 2022-04-06 08:43:44 +01:00
youben11
01f6a334ff chore: remove macos workaround for linking runtimelib 2022-04-04 11:52:23 +01:00
youben11
ec7d1232f1 feat: add runtimeLib link for library compilation
runtime library will be linked to compiled library
2022-04-04 11:52:23 +01:00
Quentin Bourgerie
fc51b1d2ab fix(compiler): Activate the loop parallelism in ConcreteToBConcrete when the option is set 2022-03-28 09:41:27 +02:00
Quentin Bourgerie
f8968eb489 enhance(compiler/support): Refactor lambda support to have fatorized supoort for both lib and jit lambda 2022-03-24 11:00:36 +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
Antoniu Pop
8ee456315e fix(compiler): fix code generated for library header. 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
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
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
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
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