Commit Graph

25 Commits

Author SHA1 Message Date
youben11
cae9af36b0 fix: print ksLogBase correctly 2021-09-09 20:35:28 +02:00
youben11
c3d6bea247 fix: jit arguments must be uint64 2021-09-09 20:35:28 +02:00
Quentin Bourgerie
d03adbd7dc enhance(compiler): Add options for verbose passes 2021-09-08 11:44:51 +02:00
Quentin Bourgerie
8057ee7553 refactor(compiler): Prepare the MidLFHE parameters injection 2021-08-24 16:21:31 +02:00
Andi Drebes
8b9c9f2da1 refactor(compiler): HLFHE.dot_eint_int: Switch from reference to value semantics
This changes the semantics of `HLFHE.dot_eint_int` from memref-based
reference semantics to tensor-based value semantics. The former:

  "HLFHE.dot_eint_int"(%arg0, %arg1, %arg2) :
     (memref<Nx!HLFHE.eint<0>>, memref<Nxi32>, memref<!HLFHE.eint<0>>) -> ()

becomes:

  "HLFHE.dot_eint_int"(%arg0, %arg1) :
     (tensor<Nx!HLFHE.eint<0>>, tensor<Nxi32>) -> !HLFHE.eint<0>

As a side effect, data-flow analyses become much easier. With the
previous memref type of the plaintext argument it is difficult to
check whether the plaintext values are statically defined constants or
originate from a memory region changed at execution time (e.g., for
analyses evaluating the impact on noise). Changing the plaintext type
from `memref` to `vector` makes such analyses significantly easier.
2021-08-17 16:53:32 +02:00
Quentin Bourgerie
f45abce604 feat(compiler): More lowlfhe operators conversion to mlir std dialects 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
03297fd50d fix(compiler/lowlfhe): for the v0 give the lweSize of ciphertext as a global parameter of the lowering pass to concrete api call (#62) 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
b22f585380 feat(compiler): First draft of lowering from LowLFHE to std with fct call (#62) 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
d0877536ed feat(compiler): First draft of client parameters generation, runtime support for encrypting and decrypting circuit gates, integration of fhe parameters for the v0 (#65, #66, #56) 2021-08-13 14:05:29 +02:00
Ayoub Benaissa
7a2511b3d4 feat(compiler): LowLFHE dialect (#77)
* feat(compiler): low level fhe dialect

* feat(compiler): using generated printer/parser in LowLFHE

* feat(compiler): new types and ops for LowLFHE

* tests(compiler): LowLFHE types and ops

* feat(compiler): fill ops

* cleanup

* summary + description

* tests(compiler): use new CLI args

* formatting
2021-08-05 14:32:46 +01:00
Quentin Bourgerie
b4e57984b1 feat(compiler): Add passes to lower mlir to mlir llvm ir and run jit and emit llvm code (#63) 2021-08-05 13:43:08 +01:00
Quentin Bourgerie
4e6579e019 feat/refactor(compiler): Add --passes options to activate only a subset of passes (#57) 2021-08-04 14:03:05 +02:00
Quentin Bourgerie
1605551f1a feat(compiler): HLFHEToMidLFHE pass (#57) 2021-08-04 14:03:05 +02:00
Andi Drebes
4504f090c5 feat(compiler): Add option --convert-hlfhe-tensor-ops-to-linalg
This adds a new command line option
`--convert-hlfhe-tensor-ops-to-linalg` that invokes a conversion pass
replacing any HLFHE tensor operation with an appropriate instance of
`linalg.generic`.
2021-07-16 18:03:49 +02:00
Andi Drebes
27990a8302 feat(compiler): Add option --verify-diagnostics
The option `--verify-diagnostics` allows the user to interleave
invalid source code with diagnostic messages that should be produced
during parsing and checks if these messages are actually produced. The
expected diagnostic messages are specified using `// expected-error`
markers.
2021-07-16 18:03:49 +02:00
Andi Drebes
ee03a48447 feat(compiler): Add option --split-input-file
The new option `--split-input-file` allows the user to add `// -----`
markers to a source file, causing the file to be split into multiple
chunks that are treated as if they were specified in different files.
2021-07-16 18:03:49 +02:00
Andi Drebes
74671794e3 refactor(compiler): Use idiomatic approach for I/O management
Use a more idiomatic approach for I/O using `llvm::SourceManager` to
manage input files and `mlir::openOutputFile` to write to the
output. This commit prepares management of diagnostics in subsequent
changes.
2021-07-16 18:03:49 +02:00
Andi Drebes
2c4748b414 refactor(compiler): Use LLVM command line parser instead of tclap
LLVM already provides a command line parser, covering the use of tclap
in the sources. This patch uses the LLVM command line parser instead
of tclap and thus reduces the number of external dependencies.
2021-06-08 14:05:15 +02:00
Ayoub Benaissa
eef82a4713 style(compiler): c++ formatting with github action (#22)
* style(compiler): c++ formatting with github action

* style(compiler): update format script
2021-06-04 09:18:14 +02:00
Quentin Bourgerie
f0615da12a fix(compiler): segfault on parse error 2021-05-28 12:08:42 +02:00
Quentin Bourgerie
122759eabf feat(compiler): Introduce MidLFHEDialect (!MidLFHE.lwe<size>, !MidLFHE.glwe<size,n>) 2021-05-28 12:08:41 +02:00
Quentin Bourgerie
d4b7d61f99 chore(compiler): Add configuration of test and introduce command line options 2021-05-28 12:08:41 +02:00
Andi Drebes
788adcbbae feat(compiler): Let zamacompiler parse an MLIR source file and dump the in-memory representation 2021-05-28 12:02:18 +02:00
Quentin Bourgerie
32340d3ec0 feat(compiler): Introduce HLFHEDialect 2021-05-28 12:02:18 +02:00
Quentin Bourgerie
f7c11a0c4e chore(compiler): Empty MLIR structure 2021-05-18 10:57:48 +02:00