Commit Graph

128 Commits

Author SHA1 Message Date
rudy
9717ec583e fix(frontend-python): round_bit_pattern, prevent exactness argument misuse 2024-04-02 13:51:55 +02:00
Umut
a98feed824 fix(frontend-python): keep negative values inside tlus as is instead of converting them to unsigned 2024-03-29 14:03:18 +03:00
Umut
29e131a6ef fix(frontend-python): always increase the clear bit width by one to avoid sign extension issues 2024-03-26 17:20:31 +03:00
Umut
79b72dbe4a feat(frontend-python): relax bit-width assignment of clear values 2024-03-21 13:17:14 +03:00
Alexandre Péré
170002ff20 feat(frontend-python): add support for multi-circuits 2024-03-19 14:13:18 +01:00
Umut
d13b283f98 feat(frontend-python): disable and print tlu fusing 2024-03-19 09:39:06 +01:00
Umut
7eefc6c053 feat(frontend-python): tlu on original bit width 2024-03-15 12:39:57 +03:00
Bourgerie Quentin
9dcf1c4b6f feat(frontend-python): Expose compress_input_ciphertexts as a compilation options and tests 2024-03-12 17:58:40 +01:00
Umut
aad659f160 feat(frontend-python): random inputset generator 2024-03-11 09:05:27 +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
Umut
bf548b0738 feat(frontend-python): expose integer dtype from the main module 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
Alexandre Péré
9b5a2e46da feat(compiler): support multi-circuit compilation 2024-03-01 15:35:52 +01:00
Umut
3247a28d9d feat(frontend-python): additional graph processors 2024-02-26 19:09:13 +03: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
9fdb959beb fix(frontend-python): failure to display invalid input set value 2024-02-15 17:13:05 +01:00
rudy
c5692397b4 chore(frontend-python): converter, getattr call with default 2024-02-06 15:11:20 +01:00
Umut
000ca60062 feat(frontend-python): if then else extension 2024-02-01 12:18:52 +02:00
Umut
868a910e23 chore(frontend-python): fix pylint warnings 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
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
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
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
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
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
Bourgerie Quentin
d224f3e3bf feat(frontend-python): Enable multi output programs 2023-11-13 09:22:54 +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
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
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