Commit Graph

25 Commits

Author SHA1 Message Date
Umut
cad7d67e22 feat(mlir): implement MLIR conversion for clear @ encrypted 2021-12-08 17:49:12 +03:00
Arthur Meyre
48aaed9ee8 refactor: disallow tuple input in inputset for 1-input functions
- handle the case properly once we add tuple support in #772

closes #971
2021-12-02 11:59:42 +01:00
Umut
c733daa78c feat(mlir): implement MLIR conversion of MatMul 2021-11-17 15:01:29 +03:00
Umut
239f66eb46 refactor(mlir): re-write mlir conversion 2021-11-15 17:21:51 +03:00
Benoit Chevallier-Mames
9459675cfb feat: manage signed constants
closes #688
closes #612
2021-10-26 10:06:15 +02:00
Umut
be453394fb fix(compilation): raise the appropriate error for intermediate signed integers 2021-10-20 17:15:52 +03:00
Arthur Meyre
384026364e test: create default_compilation_configuration fixture
- update test code and use it where appropriate
- remove duplicate tests that lacked correctness verification
2021-10-19 08:51:35 +02:00
Arthur Meyre
82688206f7 refactor(mlir): generate tables before converting nodes to MLIR
- MLIRConverter becomes an abstract base class
- pass the needed informations in an extra dict to MLIR converters
- NPMLIRConverter handles the specifics of numpy tables generation
2021-10-18 18:39:27 +02:00
Umut
5fce0d2920 feat(compilation): implement MLIR conversion of constant arrays 2021-10-07 16:17:48 +03:00
Umut
c47dac833b refactor: replace scalars with () shaped tensors, disable python list support in inputset 2021-09-29 17:55:58 +03:00
Umut
e4a06116ec fix: inputset of test_mlir_converter for dot operation 2021-09-23 16:31:52 +03:00
Umut
441c4f9e7d feat: check inputset size 2021-09-20 17:05:22 +03:00
youben11
bd8dca11d5 fix(TLU): extend TLU to 2 ** bit_width elements 2021-09-14 17:57:52 +01:00
Benoit Chevallier-Mames
8522e58280 refacto: rename 'dataset' into a clear 'inputset'
closes #340
2021-09-14 17:31:55 +02:00
Arthur Meyre
959328e0f5 chore: rename hdk to concrete first pass 2021-09-06 18:43:49 +02:00
youben11
31c1787af2 feat(mlir): conversion of dot node into MLIR 2021-09-03 08:57:07 +01:00
youben11
f686ca535a feat(mlir): convert TensorValue inputs to MLIR
factorized the input type conversion of scalar values
2021-09-03 08:57:07 +01:00
Arthur Meyre
bf2585ba0a refacto: rename hnumpy to numpy as requested for the package imports 2021-09-02 12:20:01 +02:00
Umut
1e8debfb57 refactor: rename ClearValue/EncryptedValue to ClearScalar/EncryptedScalar 2021-09-01 15:33:19 +03:00
youben11
784158741e feat(mlir): TLU conversion 2021-08-31 09:04:24 +01:00
Umut
1d5be5a1e7 refactor: re-organize data types and values 2021-08-24 16:13:36 +03:00
youben11
788e94bfa3 feat: end to end compilation and execution 2021-08-18 08:08:19 +01:00
youben11
3922bfe9b4 feat(mlir): support constant inputs in mlir conversion 2021-08-16 14:58:56 +01:00
youben11
8fbe5dab4d fix(mlir): unsigned are considered signless in compiler
+ changed the name of compiled func to main, as it's the default name to
  be executed later
2021-08-16 14:58:56 +01:00
Ayoub Benaissa
f6c9618b5a feat(mlir): MLIR Conversion (#103)
* feat(mlir): conversion from HDKIR to MLIR

* feat(mlir): support ir.Sub and ir.Mul

- better type conversion from HDK to MLIR
- Context management inside the converter class
- better handling of input type in conversion functions

* refactor(mlir): use input and output from OPGraph

Co-authored-by: Arthur Meyre <arthur.meyre@zama.ai>

* feat(mlir): eint-int subtractions

* feat(mlir): adhere to spec for supported ops

* feat(OPGraph): getters for ordered inputs/outputs

+ formatting

* tests(mlir): test converion via compiler roundtrip

* fix(mlir): flip operands on int_eint sym ops

* feat(mlir): check that the outputs are unsigned

* feat(mlir): set bit_width of all nodes to the max

This is currently required as the compiler is already assuming this.
Could be removed from HDK when the compiler can do it on its own

* feat: value_is_integer + CRs

disable some linting errors

* tests: update compile tests + coverage

* refactor: reorganize mlir package + better doc

* doc: conformance with pydocstyle

Co-authored-by: Arthur Meyre <arthur.meyre@zama.ai>
2021-08-13 12:50:31 +01:00