Commit Graph

74 Commits

Author SHA1 Message Date
Agnes Leroy
df5f1837fc test(compiler): add test for N = 16384 on GPU 2023-03-24 15:29:43 +01:00
Andi Drebes
d1781e0901 refactor(compiler): Remove unused header files from TensorOpsToLinalg.cpp 2023-03-24 11:06:51 +01:00
Andi Drebes
488877ac0b test(compiler): Add tests for batching of TFHE operations
Re-introduce the previously deleted batching tests for BConcrete as
tests for TFHE with the addition of a new test, checking that
non-batchable operands generated by pure operations are hoisted.
2023-03-24 11:06:51 +01:00
Andi Drebes
fa5c09a52b feat(compiler): Run batching pass after conversion to TFHE
With TFHE operations becoming batchable, the batching pass must now be
run after the conversion to TFHE,and TFHE parametrization, but before
any further lowering.
2023-03-24 11:06:51 +01:00
Andi Drebes
9cd238db82 refactor(compiler): Separate TFHE parametrization into its own pipeline stage 2023-03-24 11:06:51 +01:00
Andi Drebes
fdb4594a2b feat(compiler): Add lowering path for batched TFHE operations to Concrete 2023-03-24 11:06:51 +01:00
Andi Drebes
b495f9dd5c feat(compiler): Make TFHE.keyswitch_glwe and TFHE.bootstrap_glwe batchable 2023-03-24 11:06:51 +01:00
Andi Drebes
b24709a1ec feat(compiler): Batching: Hoist non-batchable operands produced by pure ops
The batching pass only creates a batched version of a batchable
operation if all of its non-batchable operands are defined out ouf the
outermost loop the iterating over the values of the batchable operand.

This change also allows for operations to be batched if the
non-batachable operands are generated by operations, which are pure
and thus hoistable out of the outermost loop.
2023-03-24 11:06:51 +01:00
Andi Drebes
3309615d7b fix(compiler): Batching: Bail out if batchable operand is not produced by an op
An early test for a batchable operation checks whether the batchable
operand is produced by a `tensor.extract` operation and bails out if
this is not the case. However, the use of `llvm::dyn_cast<T>()` directly
on the defining operation of the batchable operand causes an attempt
to cast a null value for an operand which is not produced by an
operation (e.g., block arguments).

Using `llvm::dyn_cast_or_null<T>()` fixes this issue.
2023-03-24 11:06:51 +01:00
Andi Drebes
a0e5628a88 refactor(compiler): Remove implementation of batching interface from all Concrete operations 2023-03-24 11:06:51 +01:00
Andi Drebes
dafb33414d refactor(compiler): Mark TFHE operations as side-effect free 2023-03-24 11:06:51 +01:00
Quentin Bourgerie
67e2518df9 chore(compiler): Build rust libraries with target-feature 2023-03-23 15:54:30 +01:00
youben11
9e79c4750d test(compiler): disable exception tests on macos temporarily 2023-03-22 18:55:26 +01:00
youben11
568d0e2912 fix(compiler): use value in range of the i5 type
it's actually weird that the test was passing all this time, and only
failed since we tested on MacOS M1
2023-03-22 18:55:26 +01:00
youben11
2a81f2e333 chore(compiler): disable SDFG in SDFG tests for macos 2023-03-22 18:55:26 +01:00
youben11
529d96f564 fix(compiler): update mlir-c usage in rust bindings 2023-03-22 18:55:26 +01:00
tmontaigu
2cdf166b96 feat(rust): change build.rs to work on arm64 targets 2023-03-22 18:55:26 +01:00
rudy
806d50ab7f fix|compiler: incorrect optimizer display for complexity 2023-03-22 17:16:40 +01:00
rudy
6556bee101 fix|compiler: MANP extract for v0 strategy is incorrect 2023-03-22 14:27:30 +01:00
Quentin Bourgerie
128734a682 chore: Final layout of the concrete project 2023-03-22 14:22:11 +01:00
Quentin Bourgerie
a1a955f5e2 chore(concrete-optimizer): Use the local concrete-cpu noise-model 2023-03-22 14:22:11 +01:00
Quentin Bourgerie
8349d7824e chore(concrete-cpu): Move concrete-cpu implementation 2023-03-22 14:22:11 +01:00
Samuel Tap
0210bc28c3 new crt basis
Co-authored-by: Jad Khatib <jadkhatib6@gmail.com>
2023-03-21 16:13:48 +01:00
aPere3
a2b143f409 feat(concrete-compiler): add support for key type parameters and attributes 2023-03-21 13:13:25 +01:00
aPere3
5c1a15c514 chore(concrete-compiler): removes unnecessary precision parameter in bootstrap signature 2023-03-21 13:13:25 +01:00
Mayeul@Zama
d2bfa03104 chore(CI): use nightly rust 2023-03-21 13:12:06 +01:00
Mayeul@Zama
833dc1fa54 feat(compiler): use hardware aes for csprng 2023-03-21 10:51:51 +01:00
rudy
46755e613c feat(optimizer): expose multi parameter entry point
implementation is limited to solo parameter
2023-03-21 10:30:46 +01:00
youben11
23bfb7f00a tests: add option to minimize tests
also removes 80 bits of security tests
2023-03-21 07:21:56 +01:00
Agnes Leroy
7afaa44919 fix(optimizer): support additional poly sizes for GPU PBS 2023-03-20 15:57:39 +01:00
Quentin Bourgerie
fc46d4d6ca chore(compiler): Always build external rust project 2023-03-17 16:33:39 +01:00
Umut
4e7cbac264 refactor: concrete-numpy to concrete-python 2023-03-17 13:29:21 +01:00
Mayeul@Zama
45f5267f3d fix(CI): add newlines in end of files 2023-03-16 17:35:34 +01:00
Quentin Bourgerie
d1cac8e25d chore(ci/compiler): Fixing build and push compiler docker images 2023-03-15 14:11:58 +01:00
Mayeul@Zama
570ad78442 cleanup: remove concrete-core references 2023-03-15 10:55:13 +01:00
rudy
a88a9c01b0 fix: v0-parameters, update security choice 2023-03-14 16:54:45 +01:00
rudy
8422a0ea2c fix: solo_key::analyse, rm unused field
was used only to prevent too conservatives pre-cuts,
we no longer have pre-cuts
2023-03-14 16:54:45 +01:00
rudy
7d69ce0f40 fix: nightly clippy 2023-03-14 16:54:45 +01:00
Samuel Tap
77255e7eda remove ceil in wop-pbs constraint 2023-03-14 16:54:45 +01:00
rudy
0156040982 fix: cuts for dag optimization are backs 2023-03-14 16:54:45 +01:00
youben11
1e435de9d6 fix: prefix compiled function name to avoid collision w other func
the new wrapper function will make a call to the main compiled function,
and we got some problem in the GOT/PLT due to function of the same name.
So now we prefiex with `concrete_` to avoid that.
2023-03-14 11:18:55 +01:00
youben11
dc8b762708 fix: add a wrapper to compiled circuits to unify invocation
this was already implemented for JIT using mlir::ExecutionEngine, but
was using a different, and more complex way for library compilation and
execution, which was causing a bad calling convention at the assembly
level in MacOS M1 machine. This commits unify the invocation of JIT and
Library compiled circuit, solving the previously mentioned issue, but
also gives the ability to extend compiled libraries to support more than one
returned value
2023-03-14 11:18:55 +01:00
Quentin Bourgerie
b1a94ac245 chore(compiler): format 2023-03-14 10:33:35 +01:00
Quentin Bourgerie
0b76f2c49e fix: Fix compiler compilation break after API break in concrete-cpu 2023-03-13 22:10:41 +01:00
Quentin Bourgerie
a241447da6 chore: Update ci to directly launch slab command and fix docker images 2023-03-13 20:13:01 +01:00
Quentin Bourgerie
e02d12ab64 chore: Remove concrete-core dependecy and use the local concrete-cuda instead 2023-03-10 13:30:56 +01:00
Quentin Bourgerie
d81c76aa02 chore: Fixing compilation error of the python bindings 2023-03-10 13:25:56 +01:00
Mayeul@Zama
645986803c fix(optimizer): fix new nightly lints 2023-03-09 18:43:33 +01:00
Quentin Bourgerie
55e6d075c9 fix(compiler): unused-result 2023-03-09 17:47:16 +01:00
Andi Drebes
3b00274a02 refactor(compiler): Use FoldAdaptor for FHE and FHELinalg folders
As per
https://discourse.llvm.org/t/psa-new-improved-fold-method-signature-has-landed-please-update-your-downstream-projects/67618,
attribute-based folders are now deprecated and their use generates a
warning during compilation.

This patch replaces the raw attribute-based folders with folders using
`FoldAdaptor`.
2023-03-09 17:47:16 +01:00