Commit Graph

71 Commits

Author SHA1 Message Date
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
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
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
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
Umut
ca7d9f7567 chore(frontend-python): increase retries of execution of complex operations 2023-09-19 15:28:08 +02:00
Umut
fcf3de296c chore(frontend-python): reduce global p error for tests 2023-09-19 15:28:08 +02:00
Umut
e0979140b7 chore(frontend-python): don't use key cache for randomly generated tests 2023-09-19 15:28:08 +02:00
Umut
8b689a5894 feat(frontend-python): make bitwise operations multi precision 2023-09-19 15:28:08 +02:00
Umut
c9611c0289 feat(frontend-python): make comparisons multi precision 2023-09-06 11:51:03 +02:00
Umut
1841836a39 fix(frontend-python): parse parameter selection strategy if it's string in the constructor 2023-09-06 11:51:03 +02:00
Umut
6277af57e6 fix(frontend-python): fix flanky dot conversion tests 2023-08-11 11:22:54 +02:00
Umut
46f3de63cc refactor(frontend-python): re-write bit width assignment 2023-08-04 13:17:14 +02: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
Bourgerie Quentin
894ed9ec9f test(frontend-python): Remove the high p_error in graph evaluation tests 2023-08-02 15:07:21 +02:00
Umut
ade83d5335 feat(compiler): add more detailed statistics 2023-08-01 18:40:08 +02:00
Umut
79b38a72ec feat(compiler): provide circuit statistics 2023-07-26 11:08:15 +02:00
Umut
e49c16873c refactor(frontend-python): use @fhe.compiler instead of importing it and doing @compiler 2023-07-26 11:08:15 +02:00
Umut
9c4dc343f0 feat(frontend-python): add version to fhe module 2023-07-19 11:50:42 +02:00
Umut
e64ded61e4 feat(frontend-python): add fhe.zeros_like(x) and fhe.ones_like(x) extensions 2023-07-10 09:51:22 +02:00
Umut
8031f8b59e feat(frontend-python): allow single element tuple inputsets for single argument functions 2023-07-07 14:34:57 +02:00
Umut
9ef1229c51 fix(frontend-python): mimic summing like numpy exactly 2023-07-07 14:34:57 +02:00
Umut
1215a57752 fix(frontend-python): mimic reshaping like numpy exactly 2023-07-07 14:34:57 +02:00
Umut
ee5fc138ab feat(frontend-python): lazily enable simulation and execution when needed 2023-06-30 16:08:28 +02:00
youben11
094583e32b test(frontend): disable JIT in helper test config 2023-06-27 14:21:42 +01:00
youben11
9f54184375 feat(frontend): simulate execution using the compiler 2023-06-27 14:21:42 +01:00
Umut
21474cc75d fix(frontend-python): resolve pcc issues 2023-06-23 11:17:10 +02:00
Umut
f2929df39d fix(frontend-python): support concatenating signed and unsigned tensors together 2023-06-20 14:57:23 +02:00
Umut
3456978c24 feat(frontend-python): add support for np.copy 2023-06-15 14:40:46 +02:00
Umut
8b33f13b76 fix(frontend-python): use correct shift amount in optimized bitwise operations 2023-06-13 15:30:45 +02:00
Umut
b0f83ebe97 refactor(frontend-python): rename Data to Value 2023-06-09 17:41:41 +02:00
Umut
8a3e24d204 refactor(frontend-python): rename Value to ValueDescription 2023-06-09 17:41:41 +02:00
Umut
c8cc8a811d feat(frontend-python): separate arguments 2023-06-09 13:01:27 +02:00
Umut
71d511756a chore(frontend-python): fix local test failures on ANSI terminals 2023-06-09 13:01:27 +02:00
rudy
07d97f266d feat(frontend-python): display progress during fhe execution 2023-05-26 15:56:23 +02:00
Umut
fdfd4760f1 refactor(frontend-python): matmul and dot tests to be consistent with the rest of the tests 2023-05-18 09:15:27 +02:00
Umut
01850f68e6 test(frontend-python): increase the number of retries for encrypted matmul and encrypted dot tests 2023-05-18 09:15:27 +02:00
Umut
b6b6a642d8 test(frontend-python): add edge error tests for encrypted matmul and dot 2023-05-16 15:29:02 +02:00
Umut
6d16d34b22 fix(frontend-python): add missing error messages on high bit-width encrypted dot and matmul 2023-05-16 15:29:02 +02:00
Umut
52cc0c108a fix(frontend-python): update outdated tests after bit-width optimizations 2023-05-16 15:29:02 +02:00
Andrei Stoian
817ee6b637 feat(compiler): add matmul eint eint op 2023-05-15 11:36:47 +02:00
Umut
d99436e098 fix(frontend-python): broadcast tlu input on multi tlus 2023-05-11 11:31:36 +02:00