Commit Graph

11 Commits

Author SHA1 Message Date
Alexandre Péré
d9b34f13d0 refactor(frontends): unify circuits and modules 2024-09-24 14:37:37 +02:00
Umut
a8f435ff84 feat(frontend): provide an API to reset the compiler state 2024-09-13 14:26:20 +02:00
Umut
2471b374a2 test(frontend-python): make sure tlu fusing is enabled by default 2024-03-21 13:17:14 +03:00
Umut
d13b283f98 feat(frontend-python): disable and print tlu fusing 2024-03-19 09:39:06 +01: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
cce0cd882f feat(frontend-python): implement len for tracers
This makes fhe.array extension work with tensors as well!
2023-08-03 10:10:29 +02:00
Umut
8031f8b59e feat(frontend-python): allow single element tuple inputsets for single argument functions 2023-07-07 14:34:57 +02:00
rudy
417e729c00 fix(frontend-python): explicit multi outputs circuit error 2023-05-10 16:00:54 +02:00
Umut
4e7cbac264 refactor: concrete-numpy to concrete-python 2023-03-17 13:29:21 +01:00
Quentin Bourgerie
ce7eddc22d chore: Move to the mono repo layout 2023-03-08 11:23:21 +01:00