rudy
97389a3b06
Move HLFHE.dot_eint_int to HLFHELinalg.
...
Resolves #183
2021-11-09 11:39:08 +01:00
youben11
03c1588db4
chore: update to LLVM 8b7cc93e
...
major changes:
- https://llvm.discourse.group/t/psa-removed-arithmetic-ops-from-standard/4455
- use add_mlir_public_c_api_library helper to correctly add a CAPI library
2021-10-29 16:08:41 +01:00
Quentin Bourgerie
ccaf1bff15
feat(compiler): Lower HLFHELinalg.apply_lookup_table ( close #174 )
2021-10-29 13:47:38 +02:00
Quentin Bourgerie
a135d05e4d
feat(compiler): Lowering of HLFHELinalg.mul_eint_int
2021-10-29 12:18:30 +02:00
Quentin Bourgerie
0b5ee3497a
feat(compiler): Lowering of HLFHELinalg.sub_int_eint
2021-10-29 12:18:22 +02:00
Quentin Bourgerie
b81cb978d0
feat(compiler): Lowering of HLFHELinalg.add_eint_int
2021-10-29 12:17:38 +02:00
Quentin Bourgerie
ba54560680
feat(compiler): Lower HLFHELinalg binary operators
2021-10-29 12:17:38 +02:00
Quentin Bourgerie
8f4da14bdb
fix(compiler): Pad constant tabulated lambda when the input precision of apply_lookup_table has been changed
2021-10-13 10:28:35 +02:00
Quentin Bourgerie
8cc0af1220
fix(compiler): Add a pass to unparametrize LowLFHE ciphertext to remove unrelized_convesrion_cast for linalg bufferization
2021-09-09 20:35:28 +02:00
youben11
d0e71dd4f1
fix: use IndexType for size of LWE allocation
2021-09-09 20:35:28 +02:00
youben11
746d991af6
refactor: ins forward decl w generic ty @pass-init
...
Insert forward declarations with generic types at pass initialization.
More docs for all the pass for lowering LUT
2021-09-09 20:35:28 +02:00
youben11
272a725e9a
feat(lower_LUT): add precision attribute to encode LUT at runtime
2021-09-09 20:35:28 +02:00
youben11
1e07733257
fix(lower-LUT): keep output size of KS during lowering
...
output size of keyswiting wasn't set properly. As this information must
come from the selected parameters, it should goes down from the MidLFHE
to the appropriate call to ciphertext allocation
2021-09-09 20:35:28 +02:00
youben11
32d67726e2
feat(LowToCAPI): replace key alloc w getters from RT
2021-09-09 20:35:28 +02:00
youben11
d1332dfd9a
fix(compiler): polynomialSize from logPolynomialSize
...
The polynomialSize is currently holding its log2 instead of the actual
value. This should be fixed later, but in the meantime, we need to
compute it from log2
2021-09-09 20:35:28 +02:00
youben11
ea3c940f4a
feat: lower LowLFHE types (apply_lut) to llvm.ptr
2021-09-09 20:35:28 +02:00
youben11
6e2ac3af4e
feat: parameterize KS operation
2021-09-09 20:35:28 +02:00
youben11
14f171bef9
feat: parameterize bst operation
...
This is needed to have the right parameters when calling concrete
2021-09-09 20:35:28 +02:00
youben11
2b0cfce1f6
feat(compiler): LowToCAPI of apply_lut
2021-09-09 20:35:28 +02:00
Quentin Bourgerie
1077c9167c
enhance(compiler): Full lowering of hlfhe.zero, make dot_eint_int fully lowerable
2021-09-08 11:44:51 +02:00
Quentin Bourgerie
a654fb2d0e
enhance(compiler/midlfhe): Handle linalg.generic in parametrization pass
2021-09-08 11:44:51 +02:00
Quentin Bourgerie
19f1a22b6a
fix(compiler/midlfhe): Manage tensor in midlfhe parametrization
2021-09-06 10:26:40 +02:00
Quentin Bourgerie
dba76a1e1b
enhance(compiler): Add tensor ops type rewriting on high level pipepline
2021-09-06 10:26:40 +02:00
Quentin Bourgerie
6ac882fc65
fix(compiler/capi): Remove the memref for error and no more bare pointer call convention
2021-09-06 10:26:40 +02:00
Quentin Bourgerie
bc975d904e
feat(compiler): introduce bufferization passes in lowering pipeline to llvm
2021-09-06 10:26:40 +02:00
Quentin Bourgerie
19704b4b13
fix(compiler/lowlfhe): Use the lwe ciphertext parameters to allocate instead of global fhe context
2021-08-24 16:29:04 +02:00
Quentin Bourgerie
4ae00963ac
cleanup: Remove unused import
2021-08-24 16:21:31 +02:00
Quentin Bourgerie
67f0fc0f45
enhance(compiler): Introduce MidLFHE dag parametrization
2021-08-24 16:21:31 +02:00
Quentin Bourgerie
8057ee7553
refactor(compiler): Prepare the MidLFHE parameters injection
2021-08-24 16:21:31 +02:00
Quentin Bourgerie
5613c69602
cleanup(compiler): Remove debug logs...
2021-08-18 17:06:28 +02:00
Quentin Bourgerie
fa62e1f0e5
refactor(compiler): Move memref HLFHE and MidLFHE operators to tensor
2021-08-18 11:15:30 +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
8796754513
fix(compiler/lowlfhe): Fix wrong shift value for EncodeIntOp lowering
...
That's work before because we enfoce 6 as global constraint while our runJit tests are on 7 bits
2021-08-16 18:54:56 +02:00
Quentin Bourgerie
ed7dd36e70
fix(compiler): Remove the type conversion workaround, actually the order of addConversion calls matters (lifo)
2021-08-16 18:54:56 +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
youben11
4d3c7a68de
feat(compiler): MidToLowLFHE lowering
2021-08-12 13:48:51 +01:00
youben11
3d8d5c438a
refactor(compiler): generalize LinalgGenericPattern
...
also fixes an issue regarding populateWithGenerated, which can be
duplicated across different pattern files. So I redefined a different
function that is more unique to the pass that should be ran, and hide
the populateWithGenerated from the global namespace
2021-08-12 13:48:51 +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