rudy
9a09afaa80
bug(Lambda): #253 reactivate the bug about Lambda parameter number verification
...
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1327 ms total)
[ PASSED ] 5 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] Lambda_check_param.scalar_tensor_to_tensor_good_number_param
1 FAILED TEST
YOU HAVE 3 DISABLED TESTS
2021-12-07 15:29:05 +01:00
rudy
cc9186d60d
feat(tests): test lambda call with bad number of parameters or bad parameters
...
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1402 ms total)
[ PASSED ] 6 tests.
YOU HAVE 3 DISABLED TESTS
2 tests are disabled because execution is fatal
2021-12-07 15:29:05 +01:00
Mayeul@Zama
dad4390518
feat(compiler): add a key cache
2021-12-07 12:11:56 +01:00
Mayeul@Zama
f193fd71a2
fix(compiler): fix mixed-up (g)lwe dimension/size
...
add dimension -> size conversion
rename k -> glweDimension, polynomialSize -> logPolynomialSize
remove (in/out)putLweSize from KeySwitchLweOp
remove GlweSizeType from LowLFHE
2021-12-07 12:11:56 +01:00
Quentin Bourgerie
bb1add2a6f
enhance(compiler): Remove the restriction of analysis on the HLFHELinalg.dot
...
While the manp analysis wasn't handle tensor the dot operation restrict the operands to come from a block argument. Since the tensor are handled in the manp pass this restriction has no more meaning.
2021-12-07 11:17:33 +01:00
Andi Drebes
d2b2934f1f
test(compiler): Add unit tests for the lowering of HLFHELinalg.zero to linalg
2021-12-02 11:38:44 +01:00
Mayeul@Zama
693a12dce4
fix(tests): use true instead of casted "true"
2021-12-02 11:19:19 +01:00
Quentin Bourgerie
fb58dcc59d
enhance(compiler/lowlfhe): Give the runtime context as function argument instead of a global variable ( close #195 )
2021-12-02 10:56:47 +01:00
Andi Drebes
99fe188e66
fix(tests): Define defaultV0Constraints in a single place
...
The variable `defaultV0Constraints` is defined in multiple source
files for unit test, but missing in other tests. Put a single, extern
declaration in `globals.h` and the definition in `globals.cc`.
2021-12-02 10:10:53 +01:00
Andi Drebes
bf9a831c3d
test(compiler): Add unit tests for HLFHELinalg.zero
...
Add unit tests for `HLFHELinalg.zero`, including a test for the
integration into the MANP pass.
2021-12-01 11:24:27 +01:00
rudy
975ee86a5e
feat(compiler): add --compile option
...
Resolves #196
2021-11-30 17:42:28 +01:00
Quentin Bourgerie
b1e7a66b09
cleanup(compiler/lowlfhe): Remove useless LowLFHE ops and types
...
Some of these operators/types could be usefull but they are not yet use on the compiler pipeline it's preferable to remove them, and reintroduce if needed.
2021-11-30 16:11:33 +01:00
Mayeul@Zama
94b8070b3f
tests(compiler): make FileCheck tests stricter
2021-11-24 14:18:38 +01:00
Quentin Bourgerie
ddbafd713d
feat(compiler): Add the HLFHELinalg.matmul_int_eint operator
2021-11-24 09:19:25 +01:00
Quentin Bourgerie
ec8387843b
cleanup(compiler/test): Fix warning in hlfhelinalg end to end tests about comparaison between signed and unsigned integers
2021-11-17 14:19:15 +01:00
Quentin Bourgerie
e0af1523bc
cleanup(compiler/test): Formatting of mlir test string
2021-11-17 14:19:15 +01:00
Quentin Bourgerie
100862e484
feat(compiler): Add the support of linalg.tensor_expand_shape and linalg.tensor_collapse_shape on encrypted tensors
2021-11-17 14:19:15 +01:00
youben11
36413235c5
feat(compiler): lower HLFHELinalg.apply_multi_lut
...
Support broadcasting
2021-11-15 11:25:44 +01:00
youben11
ac7f1f5a6b
feat(compiler): add HLFHELinalg.apply_multi_lut
...
Apply a lookup table on the different elements of the encrypted tensors,
but using different lookup tables.
MANP support as well as tests
2021-11-15 11:25:44 +01:00
Quentin Bourgerie
5df775a51b
feat(compiler): MANP Analysis of HLFHELinalg.matmul ( closes #178 )
2021-11-12 16:50:29 +01:00
Quentin Bourgerie
af0819c403
feat(compiler): Lower HLFHELinalg.matmul_eint_int to linalg.generic ( close #177 )
2021-11-12 16:50:29 +01:00
Quentin Bourgerie
12b4771405
feat(compiler/linalg): Definition of HLFHELinalg.matmul_eint_int ( closes #176 )
2021-11-12 16:50:29 +01:00
youben11
7c83994c7f
fix(compiler): don't try to broadcast when dims are equals with value 1
2021-11-12 15:07:08 +01:00
Andi Drebes
d1960a2a7f
test(compiler): Add test for lambdas returning tensors of different integer types
...
Add tests with lambdas returning constant n-dimensional tensors
composed of different integer types (uint8_t, uint16_t, uint32_t, and
uint64_t).
2021-11-12 12:00:39 +01:00
youben11
6df9f09e48
feat(compiler): lower HLFHELinalg.neg_eint
2021-11-10 15:24:31 +01:00
youben11
99d6d11616
feat(compiler): support HLFHELinalg.neg_eint in MANP
2021-11-10 15:24:31 +01:00
youben11
d9adbab036
feat(compiler): add HLFHELinalg.neg_eint op
2021-11-10 15:24:31 +01:00
youben11
ba40f5582a
test(compiler): test HLFHE.neg_eint execution
2021-11-10 15:24:31 +01:00
youben11
efacd7d8a1
feat(compiler): support HLFHE.neg_eint in MANP
2021-11-10 15:24:31 +01:00
youben11
08869bc998
chore: separate unittests into different executables
...
it's easier to run a specific set of tests if they are into separate
executable. We shouldn't have to run them all for testing a specific set
of tests
2021-11-10 15:24:21 +01:00
youben11
aee493392b
feat(compiler): lower neg_eint from HLFHE to LowLFHE
2021-11-10 15:24:21 +01:00
youben11
c1cd6bb380
feat(compiler): add MidLFHE.neg_glwe op
2021-11-10 15:24:06 +01:00
youben11
cc4e403e7a
feat(compiler): add HLFHE.neg_eint op
2021-11-10 14:52:35 +01:00
Andi Drebes
47cb4b0e70
fix(compiler): HLFHELinalg JIT tests: Use immutable ArrayRefs for tensor arguments
...
Fix compiler warnings related to the conversion from const pointers to
mutable pointers in `tests/unittest/end_to_end_jit_hlfhelinalg.cc`.
2021-11-10 11:25:35 +01:00
Andi Drebes
8cd893a7fd
fix(compiler): JIT unit tests: Remove unused variables
...
Remove unused variable `pos` in `End2EndJit_ClearTensor_2D::extract`
and `End2EndJit_EncryptedTensor_2D::extract` to avoid warnings on
compilation.
2021-11-10 11:25:35 +01:00
Andi Drebes
5cc551dd4f
fix(compiler): JIT unit tests: Don't compare expressions of different signedness
...
Fix compiler warnings in `end_to_end_jit_clear_tensor.cc` and
`end_to_end_jit_encrypted_tensor.cc` due to the comparison of integer
expressions of different signedness.
2021-11-10 11:25:35 +01:00
rudy
97389a3b06
Move HLFHE.dot_eint_int to HLFHELinalg.
...
Resolves #183
2021-11-09 11:39:08 +01:00
Andi Drebes
c401b5ae44
test(compiler): Add JIT test returning multi-dimensional TensorLambdaArgument
2021-11-08 12:00:20 +01:00
youben11
59e859177c
refactor: replace ExecutionArg by TensorLambdaArg
...
This add support for tensor inputs from the python bindings
2021-11-08 11:55:02 +01:00
youben11
b501e3d6c0
feat(python): support functions returning tensors
2021-11-08 11:55:02 +01:00
youben11
badc8e44bf
test(comiler): add tests for result tensor when calling Lambda::operator()
...
Lambda::operator()<unique_ptr<LambdaArgument>> was giving bad results
when using tensors due to bad references. Now it's fixed and we want to
spot that in the future.
2021-11-04 19:07:54 +01:00
Andi Drebes
3d6ad06f46
test(compiler): Add tests for JitCompilerEngine::Lambda with a generic result
2021-11-03 18:32:06 +01:00
youben11
97ee8134ed
fix(python): register hlfhelinalg dialect
2021-11-03 15:37:43 +01:00
Andi Drebes
0cb5007c3c
enhance(compiler): Python bindings: Forward llvm::Expected error messages in exceptions
...
The code in `lib/CAPI/Support/CompilerEngine.cpp` invokes several
functions returning an `llvm::Expected<T>`. When those fail, the error
message retrieved from the error object the `llvm::Expected<T>`
instance is written to the standard error stream via
`mlir::zamalang::log_error()` and an exception with a more generic
error message is thrown.
This causes errors to show up on the standard error stream in tests
generating errors on purpose and checking them, e.g.:
```
tests/python/test_compiler_engine.py::test_compile_invalid[not
@main] Compilation failed: cannot find the function for generate
client parameters PASSED
```
This patch forwards the error message from an `llvm::Expected<T>`
instance in a runtime exception rather than writing it to the standard
error stream. Since exceptions are properly caught by the tests, no
errors show up during testing.
2021-11-02 16:34:42 +01:00
youben11
03c1588db4
chore: update to LLVM 8b7cc93e
...
major changes:
- https://llvm.discourse.group/t/psa-removed-arithmetic-ops-from-standard/4455
- use add_mlir_public_c_api_library helper to correctly add a CAPI library
2021-10-29 16:08:41 +01:00
Quentin Bourgerie
5bb58453aa
feat(compiler): MANP Analysis of HLFHELinalg.apply_lookup_table ( close #175 )
2021-10-29 13:47:38 +02:00
Quentin Bourgerie
ccaf1bff15
feat(compiler): Lower HLFHELinalg.apply_lookup_table ( close #174 )
2021-10-29 13:47:38 +02:00
Quentin Bourgerie
2900c9a2a1
feat(compiler): Add support of HLFHELinalg binary operators in MANP pass ( close #172 )
2021-10-29 13:47:38 +02:00
Quentin Bourgerie
be92b4580d
Merge branch 'master' into hlfhelinalg-binary-op-lowering
2021-10-29 13:47:35 +02:00
Quentin Bourgerie
e66fb20c4f
test(compiler): Re introduce tests that was removed by a prior refacto
2021-10-29 13:44:34 +02:00