Commit Graph

160 Commits

Author SHA1 Message Date
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
Bourgerie Quentin
f9c7a79183 refactor(compiler/frontend): Rename option to compress_evaluation_keys 2024-01-08 09:49:06 +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
Benoit Chevallier-Mames
c952d7b1f7 chore(frontend): using fhe.bits() feature in Game of Life example 2024-01-08 09:14:17 +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
rudy
42c7ee977e feat(frontend-python): activate local env using make 2024-01-03 18:46:53 +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
Umut
ee7a321408 chore(frontend-python): move lsb method to correct place to preserve method ordering 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
bb30881acb fix(frontend/python): introduce optimization goal to z3 to remove arbitrarily high bit-widths sometimes 2023-11-27 10:16:44 +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
bac468a968 refactor(frontend/python): improve basic implementation of game of life example 2023-11-20 10:35:55 +03:00
Umut
835d062e12 chore(frontend-python): don't require coverage for highlighting result 2023-11-16 14:04:54 +03:00
Umut
743ecfb4de feat(frontend-python): support fully encrypted np.minimum and np.maximum 2023-11-16 14:04:54 +03:00
Umut
62923d27f9 chore(frontend-python): fix pylint issues 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
Umut
f97b7705f5 fix(frontend-python): convert rounding to tlu when necessary 2023-10-25 14:44:42 +02:00
Umut
88f06aa036 fix(frontend-python): hint some values within circuits to avoid bad bit-width assignment due to incomplete inputset 2023-10-25 13:39:43 +02:00
Umut
82546cdf30 feat(frontend-python): add can store hint 2023-10-25 13:39:43 +02:00
Umut
8a3ac78fca feat(frontend-python): implement dumping/loading of auto rounders 2023-10-17 09:09:12 +02:00
Umut
0ed1a54c3f refactor(frontend-python): reduce memory usage for table construction of non-multi table lookups 2023-09-28 13:52:51 +02:00
Benoit Chevallier-Mames
af63e900cf docs(frontend): adding a Game of Life example
closes #457
2023-09-26 12:48:38 +02:00
Umut
f988eccd57 fix(frontend-python): update bad static indexing tests to use a constant inputset for consistent errors 2023-09-22 09:41:15 +02:00
rudy
da283c917b fix(frontend-python): Makefile, portability 'source' 2023-09-20 16:24:23 +02:00
rudy
9bc186c6d5 fix(frontend-python): Makefile, default value for COMPILER_BUILD_DIRECTORY 2023-09-20 16:22:45 +02:00
Umut
51f5ed9484 feat(frontend-python): improve indexing error messages 2023-09-20 13:53:33 +02:00
Umut
73f01468e7 feat(frontend-python): support dynamic table lookups 2023-09-20 13:53:33 +02:00