556 Commits

Author SHA1 Message Date
Bourgerie Quentin
11bf8d9066 fix(frontend-python): Fixing default circuit name in tfhe-rs bridge 2024-09-26 10:43:06 +02:00
youben11
d2d4613afc refactor(frontend): rename lwe_secret_key_param_at 2024-09-26 10:43:06 +02:00
youben11
061715cfe4 feat(backend/compiler): check fheuint correctness when unserializing 2024-09-26 10:43:06 +02:00
youben11
a7cf7791d4 feat(compiler/front/backend): use LWE keys inst of GLWE with TFHErs comp 2024-09-26 10:43:06 +02:00
youben11
da7857af61 feat(compiler/bindings): support moving SKs around keygen with them 2024-09-26 10:43:06 +02:00
youben11
b73f31465b feat(compiler): support keygen with a set of initial secret keys
keygen will start by setting these secret keys then generating the
remaining types of keys
2024-09-26 10:43:06 +02:00
youben11
13c250b5a9 chore(compiler): remove useless include 2024-09-26 10:43:06 +02:00
Alexandre Péré
d9b34f13d0 refactor(frontends): unify circuits and modules 2024-09-24 14:37:37 +02:00
Alexandre Péré
f39f8abbb6 fix(optimizer): please new clippy lints 2024-09-23 11:10:27 +02:00
Alexandre Péré
19bb2413e0 fix(optimizer): fix optimizer error link 2024-09-16 09:46:32 +02:00
Alexandre Péré
69d5a35c50 fix(compiler): make formatter happy 2024-09-11 16:02:08 +02:00
Alexandre Péré
e6f6a3f1e6 fix(compiler): fix test string in e2e tests 2024-09-11 16:02:08 +02:00
youben11
feac6e89d4 refactor(compiler): get fheint description from type instead of buffer
we were doing a deserialization previously to get the fheint
description, but we will now construct it from the type instead. It's
still possible for the user to get the description from the buffer and
use it for import (using the Compiler API).
2024-09-03 14:05:06 +01:00
youben11
8168d07541 refactor(compiler): compute fheuint buffer size in rust (more accurate) 2024-09-03 14:05:06 +01:00
youben11
159e8e296b feat(frontend/compiler): set correct value for noise and degree 2024-09-03 14:05:06 +01:00
youben11
cd0cf46130 feat(compiler/frontend): serialize a given secret key
This is useful for it to be used in TFHErs
2024-09-03 14:05:06 +01:00
youben11
b8912f61c3 feat(compiler): provide keyid and variance while importing
this was previously hardcoded
2024-09-03 14:05:06 +01:00
youben11
32cae8e3fe feat(compiler): get variance and keyid for a given input 2024-09-03 14:05:06 +01:00
youben11
f0d53225e2 feat(backend, compiler): convert TFHErs to Concrete ciphertext and back 2024-09-03 14:05:06 +01:00
youben11
05724edb4f fix(compiler): use initializer constructor 2024-09-03 14:05:06 +01:00
Alexandre Péré
26dd90311c chore(optimizer): enhance optimizer errors 2024-09-02 17:19:53 +02:00
Bourgerie Quentin
b2ced570fd perf(compiler): Do not instantiate csprng each time for woppbs simulation 2024-09-02 17:06:35 +02:00
Bourgerie Quentin
ce73239730 feat(compiler/clientlib): Allow decompression of seeded ciphertext before decryption 2024-08-23 17:42:23 +02:00
youben11
af4a735b0c refactor(compiler): plug with change_partition support of optimizer 2024-08-22 16:38:24 +01:00
youben11
33abefa5c2 feat(compiler): add partition attr to change partition to/from it 2024-08-22 16:38:24 +01:00
youben11
c42c016172 feat(compiler/frontend): change partition operation 2024-08-22 16:38:24 +01:00
rudy
040e152451 chore(optimizer): ref files for new security curves 2024-08-22 17:34:31 +02:00
rudy
bd6838e6da chore(optimizer): adjust tests for new security curves 2024-08-22 17:34:31 +02:00
Bourgerie Quentin
3188b50c0e chore(common): Merge remote-tracking branch 'origin/main' into backport_release/2.7.x 2024-08-22 14:28:32 +02:00
youben11
0a97006f64 fix(compiler): use checked_malloc for better error reporting 2024-08-22 10:15:27 +02:00
Alexandre Péré
971be1fee7 fix(optimizer): improve errors for unfeasible functions 2024-08-20 14:06:53 +02:00
rudy
b6f6d41ada fix(compiler): simulation, confusion between variance and std dev 2024-08-19 16:38:52 +02:00
rudy
7c0c1ef815 chore(compiler): simulation, simplify before fix 2024-08-19 16:38:52 +02:00
youben11
a9da40c1f5 chore(optimizer): revert 89ef8d344e
There was a reason for this hadcoded value. See https://github.com/zama-ai/concrete/actions/runs/10385798019/job/28755712025
2024-08-15 08:41:09 +01:00
Bourgerie Quentin
5a98041d13 chore(common): Merge branch 'main' into release/2.7.x 2024-08-13 14:12:19 +02:00
Ayoub Benaissa
89ef8d344e fix(optimizer): remove hardcoded processing unit 2024-08-13 13:51:34 +02:00
youben11
5e701eea6a test(optimizer): mix tfhers and low_precision partitions 2024-08-09 17:21:31 +01:00
youben11
901ce0419f refactor(optimizer): move external partition during change_part creation 2024-08-09 17:21:31 +01:00
youben11
72d5b7bbb4 feat(optimizer): constrain optimizer with external max_variance 2024-08-09 17:21:31 +01:00
youben11
a1398fda9f feat(optimizer): block macro parameters in external partitions
we block them by reducing the search space to a single set of parameters
which is provided by the external partition
2024-08-09 17:21:31 +01:00
youben11
67e18abd11 feat(optimizer): partition with external partitions 2024-08-09 17:21:31 +01:00
youben11
c3c0976214 feat(optimizer): add change_partition operator 2024-08-09 17:21:31 +01:00
Ayoub Benaissa
d89af27a68 docs(compiler): fix link 2024-08-08 12:31:31 +01:00
Ayoub Benaissa
9c226f1769 docs(compiler): add note for building CP wheel in the compiler 2024-08-08 12:31:31 +01:00
Alexandre Péré
941d78b1d1 feat(optimizer): improve errors for non-composable functions 2024-08-05 16:11:39 +02:00
rudy
89553858dd feat(frontend-python): release GIL on run, encrypt, decrypt 2024-08-02 11:35:08 +02:00
rudy
3adf658a97 fix(compiler): levelledOP conversion to dot like for optimizer
note: this cannot be done as before in the optimizer since the latter had more information.
here we assumed each input contribute equally to the resulting noise.

A better fix could be to provide the linear relation of inputs instead of manp and smanp.
2024-08-01 15:32:52 +02:00
Andi Drebes
9b034d9441 test(compiler): Ensure that ForLoopToParallelPass does not trigger for scf.for with parallel = false
This ensures that the regression fixed by
3cd3dff92a is not reintroduced, which
caused the compiler to abort in `ForLoopToParallelPass` for `scf.for`
loops with iteration arguments, even if these were marked with the
attribute `parallel` set to `false`.
2024-07-30 17:52:36 +02:00
Andi Drebes
3cd3dff92a fix(compiler): Convert scf.for to scf.parallel only if parallel attribute is true
The pattern converting `scf.for` operations to `scf.parallel`
operations from `lib/Transforms/ForLoopToParallel.cpp` contains an
assertion that ensures that the source operation does not have any
iteration arguments in order to keep the conversion as simple as
possible.

However, if the attribute `parallel` of the source operation is
`false`, the operation is replaced with an identical clone and the
conversion could be treated as a no-op.

This change modifies the pattern, such that it simply fails if
`parallel` is `false`, making the check for the absence of iteration
arguments unnecessary and avoiding unnecessary bailouts by the
compiler.
2024-07-29 15:52:02 +02:00
Antoniu Pop
4bb7c21739 fix(compiler): [GPU runtime] enable dependence re-split when dependence is used in multiple subgraphs. 2024-07-23 18:52:01 +01:00