Commit Graph

328 Commits

Author SHA1 Message Date
Quentin Bourgerie
cf9a36c197 feat(compiler/runtime): Support the pbs for crt encoding (enable apply_lookup_table up to 16bits) 2022-10-07 09:16:19 +02:00
Andi Drebes
55f843cd07 test(compiler): Fix comparison of ints with different signedness in unit test lib 2022-10-04 14:40:40 +02:00
Andi Drebes
85442f425d test(compiler): Move clear text tests to YAML test specification
This moves all tests from
`tests/end_to_end_tests/end_to_end_jit_clear_tensor.cc` to the test
specification in YAML format in
`tests/end_to_end_fixture/end_to_end_clear_tensor.yaml`. Parametric
tests and tests invoking lambdas in loops have been fully unrolled.
2022-10-04 14:40:40 +02:00
Andi Drebes
a7051c2c9c enhance(client/server): Add support for scalar results
This patch adds support for scalar results to the client/server
protocol and tests. In addition to `TensorData`, a new type
`ScalarData` is added. Previous representations of scalar values using
one-dimensional `TensorData` instances have been replaced with proper
instantiations of `ScalarData`.

The generic use of `TensorData` for scalar and tensor values has been
replaced with uses of a new variant `ScalarOrTensorData`, which can
either hold an instance of `TensorData` or `ScalarData`.
2022-10-04 14:40:40 +02:00
Andi Drebes
a5289a3145 enhance(tests): Add option use_default_fhe_constraints to YAML test descriptions
This adds a new optional boolean parameter
`use_default_fhe_constraints` to the YAML description of tests that
causes the test backend to use the default FHE constraints if set to
true. This is necessary for clear text tests, since automatic
determination of FHE parameters by the `CompilerEngine` fails for
programs not using encrypted integers and causes the program to abort.
2022-10-04 14:40:40 +02:00
Andi Drebes
7427a4506d test(compiler): Abort test if a stream for a YAML file is in a bad state
The code in `loadEndToEndDesc` attempts to load the contents of a YAML
file without ensuring that the stream from which the file is read was
set up correctly. As a result, streams in a bad state, e.g., if the
file to be opened does not exist, simply result in an empty string for
the file contents. The test driver cannot distinguish this result from
a valid YAML file that is simply empty.

This patch causes `loadEndToEndDesc` to abort execution whenever a
file input stream could not be set up correctly.
2022-10-04 14:40:40 +02:00
Andi Drebes
8255d3e190 fix(compiler): Add support for clear result tensors with element width != 64 bits
Returning tensors with elements whose width is not equal to 64 results
in garbled data. This commit extends the `TensorData` class used to
represent tensors in JIT compilation with support for signed /
unsigned elements of 8/16/32 and 64 bits, such that all clear text
tensors with up to 64 bits can be represented accurately.
2022-10-04 14:40:40 +02:00
rudy
cb2c9ef6bf feat: accept no evaluation keys 2022-09-26 14:43:25 +02:00
rudy
e1fb417c54 fix(optimizer): no ceiling for MANP value given to the optimizer 2022-09-19 17:59:22 +02:00
Antoniu Pop
55b719f100 feat(tests): add instantiation of end-to-end tests for each option sets. 2022-09-19 13:02:20 +01:00
Antoniu Pop
09184077d9 benchmarking: add YAML generator and ML benchmarks (see issue https://github.com/zama-ai/concrete-ml-internal/issues/1543). 2022-09-15 14:38:56 +01:00
Antoniu Pop
2cf80e76eb feat(compiler): move the lowering of dataflow tasks to RT dialect before bufferization. 2022-09-15 11:55:37 +01:00
Andi Drebes
26901a32da test(compiler): Test the bufferization of BConcrete with memrefs with non-zero offsets 2022-09-14 16:47:41 +02:00
Quentin Bourgerie
8c605a6267 test(keyset): Set a proper variance for encryp_decrypt test 2022-09-14 13:50:26 +02:00
Quentin Bourgerie
dbfde466bc feat(python): Add compilation feedback to the python bindings 2022-09-14 10:03:25 +02:00
Quentin Bourgerie
f4673e8276 feat(compiler): First draft or compilation feedback 2022-09-14 10:03:25 +02:00
rudy
32437af31b feat(test): check test error rate for fast cases 2022-09-12 17:29:03 +02:00
rudy
48bf6e2696 feat(optimizer): report or warn using global p-error 2022-09-12 17:22:38 +02:00
Umut
41c9f86803 feat: create encrypted signed integer type 2022-09-09 17:38:21 +03:00
Antoniu Pop
39e7313348 feat(tests): add function for increasing the stack limit and use for benchmark overflow. 2022-09-08 11:35:56 +01:00
rudy
deef4486ba fix: negative value have full complement 2 noise
Revert ae9a04cd56
2022-09-06 15:27:20 +02:00
Quentin Bourgerie
9e1284e880 enhance(tests): Add more tests for leveled fhe operators up to 57 bits 2022-08-25 09:46:51 +02:00
Quentin Bourgerie
2ed9fc7583 enhance(tests): Generate from 1 to 29 bits end to end tests fhe tests for basic operators 2022-08-25 09:46:51 +02:00
Quentin Bourgerie
c08a06ed8e chore: Just rename configuration variable to enable the dataflow runtime 2022-08-24 11:35:05 +02:00
Quentin Bourgerie
3b829e7628 tests: Fix some reference since the optimizer behavior has changed 2022-08-22 17:36:39 +02:00
Quentin Bourgerie
9257404f5f fix(python-bindings): Support np.array with dtype upt to 64 bits 2022-08-19 14:15:21 +02:00
Quentin Bourgerie
d647bc735f fix: Now the maximum precision is 16bits 2022-08-16 08:40:14 +02:00
Quentin Bourgerie
10f4769dae test: remove default parameters for 16bits tests 2022-08-16 08:40:14 +02:00
Quentin Bourgerie
740816feec chore: Change default constraint on test 2022-08-16 08:40:14 +02:00
Quentin Bourgerie
525d8da3a8 test: remove default parameters for 16bits tests 2022-08-16 08:40:14 +02:00
Quentin Bourgerie
73fbb20f6b tests: Temporary unactivate some tests 2022-08-12 16:35:11 +02:00
Antoniu Pop
8bacd9e7ac fix(tests): add more input values to 16bit test to catch cases where 3 byte (i17) values are not aligned properly. 2022-08-12 16:35:11 +02:00
Quentin Bourgerie
8cd3a3a599 feat(compiler): First draft to support FHE.eint up to 16bits
For now what it works are only levelled ops with user parameters. (take a look to the tests)

Done:
- Add parameters to the fhe parameters to support CRT-based large integers
- Add command line options and tests options to allows the user to give those new parameters
- Update the dialects and pipeline to handle new fhe parameters for CRT-based large integers
- Update the client parameters and the client library to handle the CRT-based large integers

Todo:
- Plug the optimizer to compute the CRT-based large interger parameters
- Plug the pbs for the CRT-based large integer
2022-08-12 16:35:11 +02:00
Quentin Bourgerie
58527a44c3 test: Add extract_slice_with_rank_reduction test since it is fixed (close #315) 2022-08-11 10:12:55 +02:00
rudy
cc6c2576ec feat(optimizer): create optimizer dag and use it 2022-08-11 10:10:27 +02:00
rudy
bd3d462384 feat(multiprecision): enable real multiple precision computation 2022-08-11 10:10:27 +02:00
Quentin Bourgerie
80f36c14de fix: Update the llvm-project with memref.subview fold fix to fix slice extraction with negative strides 2022-08-09 11:43:11 +02:00
Quentin Bourgerie
534e683055 fix: Lowering from ConcreteToBConcrete of from_elements on ND tensor of Concrete.lwe_ciphertext 2022-08-09 10:26:32 +02:00
Antoniu Pop
abff4e1c17 tests(dfr): fix mlir for func.func in tests. 2022-08-04 17:06:09 +01:00
Antoniu Pop
2f5f9f6cf1 test(dfr): add AES test. 2022-08-04 17:06:09 +01:00
Antoniu Pop
8f2b12d812 test(distributed): fix termination of tests meant to run on distributed systems to avoid ungraceful exit. 2022-08-04 17:06:09 +01:00
Antoniu Pop
93d5a06557 test: add a test for distributed execution. 2022-08-04 17:06:09 +01:00
Antoniu Pop
615109d432 fix(dfr): simplify initialization and add namespaces where possible. 2022-08-04 17:06:09 +01:00
Antoniu Pop
c79cedf557 test(parallelization): add small NN test for auto parallelization. 2022-08-04 17:06:09 +01:00
Antoniu Pop
8defa338e8 feat(runtime): enable parallel execution for TestLib when available. 2022-08-04 17:06:09 +01:00
Antoniu Pop
8beb596fab test(dfr): remove DFR unittests which are now obsolete. 2022-08-04 17:06:09 +01:00
youben11
cace7f1ebb test: add e2e tests of grouped conv2d 2022-08-04 11:19:18 +01:00
youben11
e52ccfc1a9 feat: support grouped conv2d 2022-08-04 11:19:18 +01:00
Andi Drebes
83f2095af5 test(compiler): Add regression tests for extract_slice and collapse on encrypted tensors
Commit `45577fb79e7bef9d6874906971f485ca6ed111b8` introduced a
regression causing garbage to be generated for IR involving
`tensor.extract_slice` and `tensor.collapse` in some cases. This
commit adds two tests checking for the absence of the regression.

Co-authored-by: Umut Sahin <umut.sahin@zama.ai>
2022-07-28 10:13:35 +02:00
Andi Drebes
85ebc0cb7a Rebase onto llvm-project 3f81841474fe with patch for arbitrary types in linalg named ops
Rebase to llvm-project at 3f81841474fe with a pending upstream patch
for arbitrary element types in linalg named operations.

Co-authored-by: Ayoub Benaissa <ayoub.benaissa@zama.ai>
2022-07-27 22:45:38 +02:00