youben11
60b2cfd9b7
feat: support more dtype for scalars/tensors
...
dtype supported now: uint8, uint16, uint32, uint64
2021-12-13 17:40:28 +01:00
youben11
550318f67e
feat: support different numpy object types as input
...
- Scalar types: int, np.uint8 (to extend with other types later), and np.ndarray with shape == ()
- Tensor types: np.ndarray
2021-12-13 17:40:28 +01:00
Andi Drebes
16d0502f56
fix(compiler): Initialize strides of memref parameters when JIT-invoking a function
...
Upon invocation of a function with memref arguments, the strides for
all dimensions are currently set to 0. This causes dynamic offsets to
be calculated incorrectly in the function body.
This patch replaces the placeholder values with the actual strides for
each dimension and adds a test with parametric slice extraction from a
tensor that triggers dynamic indexing.
2021-12-13 15:20:54 +01:00
Antoniu Pop
bb44124999
feat(dfr): add the DFR (DataFlow Runtime).
2021-12-08 18:35:29 +00:00
rudy
cc58608589
chore(Lambda): simplify, extract, enhance message for bit width rounding
...
bit with rounding: 5bit element is widen to a standard 8bit word
2021-12-07 15:29:05 +01:00
rudy
2c56a26c75
fix(Lambda): missing superfluous check in setArg
...
[----------] Global test environment tear-down
[==========] 7 tests from 1 test suite ran. (1513 ms total)
[ PASSED ] 7 tests.
YOU HAVE 2 DISABLED TESTS
2021-12-07 15:29:05 +01:00
rudy
47b4b667bb
fix(Lambda): #253 fix the bug about Lambda parameter number verification
...
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (1513 ms total)
[ PASSED ] 6 tests.
YOU HAVE 3 DISABLED TESTS
Compared to previous commit, a fatal test is disabled
2021-12-07 15:29:05 +01:00
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