Commit Graph

114 Commits

Author SHA1 Message Date
Bourgerie Quentin
9dcf1c4b6f feat(frontend-python): Expose compress_input_ciphertexts as a compilation options and tests 2024-03-12 17:58:40 +01:00
Bourgerie Quentin
ce74903c1d fix(frontends): Fixing tests which rely on cmdline not on configuration 2024-03-11 16:51:05 +01:00
Bourgerie Quentin
23a521e5d1 chore(ci): Test default configuration on python CI tests 2024-03-11 16:51:05 +01:00
Umut
aad659f160 feat(frontend-python): random inputset generator 2024-03-11 09:05:27 +01:00
Andi Drebes
32199292bb test(frontend-python): Re-enable min / max tests for multi-parameter optimization 2024-03-07 15:42:26 +01:00
rudy
d3e70c483f chore(frontend-python): use compression for tests to solve the missing space issue 2024-03-06 14:43:40 +01:00
Umut
760e5ef02a feat(frontend-python): support additional pre and post processors instead of just post processors 2024-03-06 12:27:08 +01:00
rudy
05bd8cc5f2 feat(frontend-python): approximate mode for round_bit_pattern 2024-03-01 16:04:11 +01:00
Umut
3247a28d9d feat(frontend-python): additional graph processors 2024-02-26 19:09:13 +03:00
rudy
e1d7be02c6 fix(frontend-python): macos os tests without graphviz 2024-02-20 17:23:58 +01:00
Umut
efc9314d25 fix(frontend-python): stop crashing on scalar squeeze 2024-02-20 12:37:48 +01:00
Umut
565e6f2796 feat(frontend-python): identity extension 2024-02-20 12:37:48 +01:00
rudy
b324ca8391 fix(frontend-python): bitwise tests coverage 2024-02-16 13:47:38 +01:00
rudy
9fdb959beb fix(frontend-python): failure to display invalid input set value 2024-02-15 17:13:05 +01:00
Bourgerie Quentin
712924a297 test(frontend-python): Temporary skip test_minimum_maximum on multi parameter optimization waiting parametrization fixes 2024-02-13 17:02:46 +01:00
rudy
0376a175a9 fix(frontend-python): test_min_max, extend marking xfail 2024-02-13 17:02:46 +01:00
Umut
000ca60062 feat(frontend-python): if then else extension 2024-02-01 12:18:52 +02:00
Umut
037600112d feat(frontend-python): drawing 2024-01-23 11:42:26 +03:00
Alexandre Péré
b2fbf8eb28 fix(frontend): fix composition bitwidth incompatibility 2024-01-19 18:25:23 +01:00
Umut
b4ed398549 fix(frontend-python): reduce the failure rate of setting keys test 2024-01-12 16:25:51 +03:00
Umut
8ef84bed42 feat(frontend-python): add relu extension 2024-01-11 16:09:42 +01:00
rudy
8183d98605 feat(frontend-python): multi-parameters, Configuration, by-precision-and-norm2 strategy 2024-01-08 20:32:27 +01:00
rudy
9b685300b4 fix(frontend-python): ensure shift strategies coverage 2024-01-08 09:38:08 +01:00
rudy
b680f3137d fix(frontend-python): some tests are broken due to compiler and cp bug
related to multi output in multi parameter
2024-01-08 09:36:34 +01:00
Bourgerie Quentin
1dec886770 feat(compiler/frontend-python): Expose default GPU CompilerOptions set and use it in concrete-python 2024-01-05 13:15:12 +00:00
aPere3
6691c8f107 feat(frontend): add support for gpu in concrete-python 2024-01-05 13:15:12 +00:00
Alexandre Péré
60da713312 feat(optimizer): adds support for function composition 2024-01-04 15:00:25 +01:00
Bourgerie Quentin
c339e2a10b chore(backend/frontend): Fixing formatting... 2024-01-02 19:23:38 +01:00
Bourgerie Quentin
9a8b644a70 chore(frontend-python): Regenerate keyset on error 2024-01-02 18:18:30 +01:00
Umut
7872bc5430 fix(frontend-python): generate correct MLIR for signed integer rounding to 1-bit 2023-12-29 12:42:29 +03:00
Umut
ee5be3af43 feat(frontend-python): keys are generated property 2023-12-29 10:19:06 +03:00
Umut
1edd341fb0 feat(frontend-python): printing assignment 2023-12-29 10:19:06 +03:00
Umut
b8db12ae53 feat(frontend-python): bit extraction 2023-12-26 14:31:23 +03:00
Bourgerie Quentin
c67fac4082 feat(compiler): Introduce input compression and use tfhe-rs as backend
- added --compress-input compiler option which forces the use of seeded
  bootstrap keys and keyswitch keys
- replaced the concrete-cpu FHE implementation with tfhe-rs

Co-authored-by: Nikita Frolov <nf@mkmks.org>
2023-12-22 15:51:02 +01:00
Umut
5fa62d3424 feat(frontend-python): fancy indexing 2023-12-21 15:51:39 +03:00
Umut
b9806e48f6 fix(frontend-python): use more strict inputset to fix a flanky test 2023-12-18 14:03:50 +01:00
Umut
54d792c7bf feat(frontend-python): add truncate bit pattern extension 2023-12-05 14:20:54 +01:00
Umut
07d6293ca8 fix(frontend-python): assigning signed values to unsigned tensors 2023-12-04 13:37:26 +01:00
Umut
d87776cdc9 feat(frontend-python): make it possible to query maximum bit-width of a graph after bit-width assignment 2023-11-30 18:34:32 +03:00
Umut
ece4f2e216 fix(frontend-python): hint correct node when it's used after assignment 2023-11-29 09:46:02 +03:00
Umut
b25d794815 fix(frontend/python): copy node inputs to have correct bounds on nodes 2023-11-27 10:16:44 +03:00
Umut
62982815d0 feat(frontend/python): process graph in place before MLIR conversion for being able to see the assigned bit-widths afterward 2023-11-27 10:16:44 +03:00
Umut
5422e0c272 test(frontend/python): use hinting instead of multiple outputs to test semi-optimized min/max 2023-11-23 09:32:19 +01:00
Umut
743ecfb4de feat(frontend-python): support fully encrypted np.minimum and np.maximum 2023-11-16 14:04:54 +03:00
Bourgerie Quentin
d224f3e3bf feat(frontend-python): Enable multi output programs 2023-11-13 09:22:54 +01:00
Umut
d4cc79f10d test(frontend-python): add tests of assigning circuit.keys 2023-11-10 14:35:17 +01:00
Alexandre Péré
e8ef48ffd8 feat(compiler): introduce concrete-protocol
This commit:
 + Adds support for a protocol which enables inter-op between concrete,
   tfhe-rs and potentially other contributors to the fhe ecosystem.
 + Gets rid of hand-made serialization in the compiler, and
   client/server libs.
 + Refactors client/server libs to allow more pre/post processing of
   circuit inputs/outputs.

The protocol is supported by a definition in the shape of a capnp file,
which defines different types of objects among which:
 + ProgramInfo object, which is a precise description of a set of fhe
   circuit coming from the same compilation (understand function type
   information), and the associated key set.
 + *Key objects, which represent secret/public keys used to
   encrypt/execute fhe circuits.
 + Value object, which represent values that can be transferred between
   client and server to support calls to fhe circuits.

The hand-rolled serialization that was previously used is completely
dropped in favor of capnp in the whole codebase.

The client/server libs, are refactored to introduce a modular design for
pre-post processing. Reading the ProgramInfo file associated with a
compilation, the client and server libs assemble a pipeline of
transformers (functions) for pre and post processing of values coming in
and out of a circuit. This design properly decouples various aspects of
the processing, and allows these capabilities to be safely extended.

In practice this commit includes the following:
 + Defines the specification in a concreteprotocol package
 + Integrate the compilation of this package as a compiler dependency
   via cmake
 + Modify the compiler to use the Encodings objects defined in the
   protocol
 + Modify the compiler to emit ProgramInfo files as compilation
   artifact, and gets rid of the bloated ClientParameters.
 + Introduces a new Common library containing the functionalities shared
   between the compiler and the client/server libs.
 + Introduces a functional pre-post processing pipeline to this common
   library
 + Modify the client/server libs to support loading ProgramInfo objects,
   and calling circuits using Value messages.
 + Drops support of JIT.
 + Drops support of C-api.
 + Drops support of Rust bindings.

Co-authored-by: Nikita Frolov <nf@mkmks.org>
2023-11-09 17:09:04 +01:00
Umut
14a5390ec6 chore(frontend-python): increase the number of random shift tests 2023-10-30 15:53:03 +01:00
Umut
004108f39a chore(frontend-python): only test with simulation for extremely long-running tests 2023-10-30 15:53:03 +01:00
Umut
088cca4b83 feat(frontend-python): create multivariate extension 2023-10-30 15:53:03 +01:00