Commit Graph

94 Commits

Author SHA1 Message Date
rudy
f7533d47eb fix: --force-encoding crt 2022-12-22 12:16:58 +01:00
rudy
4ed0c01d8e feat(optimizer): option to disable optimizer cache
--optimizer-no-cache-on-disk
2022-12-13 18:54:40 +01:00
aPere3
2fd9b6f0e3 refactor(encodings): raise plaintext/lut encodings higher up in the pipeline 2022-12-13 17:01:52 +01:00
Andi Drebes
e2e6df322e feat(compiler): Add support for full unrolling of loops with SDFG-convertible ops
This adds a new option `--unroll-loops-with-sdfg-convertible-ops`,
which causes loops containing SDFG-convertible operations to be fully
unrolled upon the extraction of SDFG-operations using the
`--emit-sdfg-ops` switch. This avoids constant roundtrips between an
SDFG-capable accelerator and the host during execution of a loop.

The option is limited to `scf.for` loops with static bounds and a
static step size. Since full unrolling of loops with large bounds
results in a large number of operations, the option is disabled by
default.
2022-12-13 12:03:51 +01:00
Andi Drebes
ee2f743a78 feat(compiler): Add new action dump-sdfg
Add a new action `dump-sdfg` to `concretecompiler` that causes the IR
to be dumpred right after the extraction of SDFG operations.
2022-12-08 14:54:14 +01:00
Andi Drebes
3da32560b7 feat(compiler): Add pass converting operations into SDFG processes
This adds a new pass `ExtractSDGOps`, which scans a function for
operations that implement `SDFGConvertibleOpInterface`, replaces them
with SDFG processes and constructs an SDFG graph around the processes.

Initialization and teardown of the SDFG graph are embedded into the
function and take place at the beginning of the function and before
the function's terminator, respectively.

The pass can be invoked using concretecompiler by specifying the new
compilation option `--emit-sdfg-ops` or programmatically on a
`CompilerEngine` using the new compilation option `extractSDFGOps`.
2022-12-08 14:54:14 +01:00
Andi Drebes
9f3615513b feat(compiler): Add new dialect SDFG for static data flow graphs
This adds a new dialect called "SDFG" for data flow graphs. An SDFG
data flow graph is composed of a set of processes, connected through
data streams. Special streams allow for data to be injected into and
to be retrieved from the data flow graph.

The dialect is intended to be lowered to API calls that allow for
offloading of the graph on hardware accelerators.
2022-12-08 14:54:14 +01:00
rudy
5516a55c1c feat: option to force cyphertext encoding 2022-12-08 14:42:25 +01:00
Quentin Bourgerie
50973a39bd refactor(compiler): Remove async offloading of BS/KS 2022-11-30 10:29:19 +01:00
Quentin Bourgerie
9e16f31b87 refactor(bconcrete): Separate bufferization and CAPI call generation 2022-11-30 10:29:19 +01:00
Mayeul@Zama
0657767bae style(cmake): run format_cmake.sh 2022-11-18 15:15:41 +01:00
Andi Drebes
c9bb6541e9 feat(compiler): Add option --batch-concrete-ops and action dump-concrete-with-loops
The new option `--batch-concrete-ops` invokes the batching pass after
lowering to the Concrete dialect and after lowering linalg operations
with operations from the Concrete dialect to loops.

The new action `dump-concrete-with-loops` dumps the IR right before
batching.
2022-11-18 12:06:07 +01:00
rudy
018684fe2a chore: activate Wall Werror 2022-11-04 10:44:46 +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
rudy
48bf6e2696 feat(optimizer): report or warn using global p-error 2022-09-12 17:22:38 +02:00
Quentin Bourgerie
5492ed01eb feat: plug the compiler pipeline with the optimizer for 16 bits eint 2022-08-16 08:40:14 +02:00
rudy
f3933aeddc feat(optimizer): connect to new entry point supporting woppbs 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
954b2098c6 feat(runtime): enable distributed execution. 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
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
rudy
231f413a21 fix(main): unchecked llvm expected 2022-04-22 15:14:41 +02:00
youben11
78def04fe5 refactor: rename [jit|library]lambdasupport to [jit|library]support 2022-04-04 09:15:31 +01:00
Antoniu Pop
51d4d044cb fix(build): refactor DFRuntime build and link in ConcretelangRuntime instead. 2022-04-01 20:39:16 +01:00
Mayeul@Zama
9ccced7d93 fix(cmake): unify tablegen headers generation dependencies 2022-03-30 17:20:20 +02:00
Quentin Bourgerie
3fccc98e68 cleanup(compiler): Remove references to JitCompilerEngine to the main 2022-03-24 11:00:36 +01:00
Antoniu Pop
337a9bb5c2 fix(dfr): add runtime termination call on compiler main exit. 2022-03-17 16:15:02 +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
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
260768e9af enhance(dfr): use linker wrapping of main in addition to start/stop; enable DFR+OpenMP. 2022-02-03 10:59:12 +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
58e02fd035 feat(Testlib): lib for testing libs generated by concretecompiler
Closes #201
2022-01-05 09:29:57 +01:00
rudy
b8bd38dd6c feat(compiler): Output client parameters when compile to a library
close #198
2022-01-03 17:57:16 +01:00