Commit Graph

3428 Commits

Author SHA1 Message Date
Umut
8df212ff49 bench: create the benchmarking infrastructure 2021-08-17 13:17:28 +03:00
Arthur Meyre
8dfed58829 chore(tools): add flake8 linter, flake8-bugbear plugin and fix issues
- remove detected `from hdk imports` (use relative imports instead) we ARE
the package
- change the way Float32 and Float64 are defined
2021-08-17 09:22:39 +02:00
Quentin Bourgerie
8796754513 fix(compiler/lowlfhe): Fix wrong shift value for EncodeIntOp lowering
That's work before because we enfoce 6 as global constraint while our runJit tests are on 7 bits
2021-08-16 18:54:56 +02:00
Quentin Bourgerie
96c50d5dca fix/chore(docker/zamalang-env): Update to the latest concrete-api-env 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
ed7dd36e70 fix(compiler): Remove the type conversion workaround, actually the order of addConversion calls matters (lifo) 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
42f12b22da fix(compiler): move the midlfhe to lowlfhe pass to the right place 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
f45abce604 feat(compiler): More lowlfhe operators conversion to mlir std dialects 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
03297fd50d fix(compiler/lowlfhe): for the v0 give the lweSize of ciphertext as a global parameter of the lowering pass to concrete api call (#62) 2021-08-16 18:54:56 +02:00
Quentin Bourgerie
b22f585380 feat(compiler): First draft of lowering from LowLFHE to std with fct call (#62) 2021-08-16 18:54:56 +02: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
Umut
479176e368 doc(examples): create quantized linear and logistic regression examples 2021-08-16 15:57:18 +03:00
Arthur Meyre
048bb61e8e fix(tools): add git to the docker image to be able to make coverage
- move comment in Makefile and make it silent
2021-08-13 18:11:43 +02:00
Benoit Chevallier
3245d3e673 Feat/user friendly arbitrary function name 144 (#149)
* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

* feat: let the dev give a useful name for ArbitraryFunction

might be useful to debug or understand what happens
closes #144

Co-authored-by: Benoit Chevallier-Mames <benoitchevalliermames@zama.ai>
2021-08-13 18:10:35 +02:00
Umut
5961d1630e refactor(compilation-artifacts): enable showing data types during export 2021-08-13 15:15:54 +03:00
Quentin Bourgerie
d0877536ed feat(compiler): First draft of client parameters generation, runtime support for encrypting and decrypting circuit gates, integration of fhe parameters for the v0 (#65, #66, #56) 2021-08-13 14:05:29 +02:00
Quentin Bourgerie
e290447389 chore(compiler): Get the concrete capi release 2021-08-13 14:05:29 +02: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
Ben
94e9c513e9 Update README.rst 2021-08-13 10:28:55 +01:00
Ben
ea3909968c Merge branch 'main' of github.com:zama-ai/parameter-curves 2021-08-13 10:24:29 +01:00
Ben
f0b6703d5a add pic 2021-08-13 10:24:19 +01:00
Ben
7f0ff46e31 update README 2021-08-13 10:07:37 +01:00
Ben
c3d3cdf87d typo in readme 2021-08-13 10:00:38 +01:00
Ben
9ab27bd39e add another todo 2021-08-13 10:00:01 +01:00
Ben
f1b9b4a2e5 remove todos which have been completed 2021-08-13 09:59:26 +01:00
Ben
f7e84e3dd9 data w/ mitm 2021-08-13 09:57:03 +01:00
Umut
2c3c080923 test(direct-tlu): create debugging and compilation tests for direct table lookup 2021-08-12 17:41:06 +03:00
Ben
7b152927bb rm unused fn 2021-08-12 14:54:34 +01:00
Ben
4a5083bdea this todo has been fixed 2021-08-12 14:53:59 +01:00
Benoit Chevallier
4afc373a6b Update GETTING-STARTED.md
Adding the group name
2021-08-12 15:51:35 +02:00
Ben
37af7e1375 store bug here instead 2021-08-12 14:17:38 +01:00
Benoit Chevallier-Mames
4f6103d1d1 fix: fixing issue in the graph generation
closes #130
2021-08-12 15:17:35 +02:00
Ben
ef0d80200e seperate out code 2021-08-12 14:07:36 +01:00
youben11
4d3c7a68de feat(compiler): MidToLowLFHE lowering 2021-08-12 13:48:51 +01:00
youben11
e401d9fb69 feat(compiler): update LowLFHE for MidLFHE lowering
-Encoding Cleartext to Plaintext Op
-Encoding Int to Plaintext Op
-Cleartext/Plaintext should add a bits field as `p`
-Op to create a constant Cleartext
-IntToCleartextOp: kind of casting an int to be later encoded, I'm not
sure if there is a better mechanism for this (e.g. auto casting in Ops),
but we currently need a way to encode int into plaintext, and we need to
go through cleartexts
2021-08-12 13:48:51 +01:00
youben11
3d8d5c438a refactor(compiler): generalize LinalgGenericPattern
also fixes an issue regarding populateWithGenerated, which can be
duplicated across different pattern files. So I redefined a different
function that is more unique to the pass that should be ran, and hide
the populateWithGenerated from the global namespace
2021-08-12 13:48:51 +01:00
Ben
aa0354a731 update estimator 2021-08-12 11:35:52 +01:00
Ben
7c08229be4 rm old estimator 2021-08-12 11:30:50 +01:00
Umut
8fd0ae5c85 feat(docker): create a docker environment to test and develop MLIR stuff 2021-08-12 10:51:26 +03:00
Benoit Chevallier-Mames
8f3e461e3b fix: docstring following google conventions
refs #122
2021-08-11 18:11:56 +02:00
Ben
040a3e330d Merge branch 'main' of github.com:zama-ai/estimator-issues 2021-08-11 16:00:02 +01:00
Ben
7dc8c610fa fix 2021-08-11 15:51:38 +01:00
Ben
d91b6f9b59 Create dependabot.yml 2021-08-11 15:51:26 +01:00
Ben
30dd01a690 try to use dependabot 2021-08-11 15:50:35 +01:00
Ben
1a1c4027e6 start to tidy up 2021-08-11 15:47:43 +01:00
Ben
82b02ea806 dont skip mitm 2021-08-11 14:47:46 +01:00
Ben
4be9b115c4 python import error 2021-08-11 14:45:35 +01:00
Benoit Chevallier-Mames
765df12a2d doc: add autogenerated doc in sphinx
refs #118
2021-08-11 15:23:11 +02:00
Arthur Meyre
7bdcfabbfe feat(hnp-tracing): add support for ufunc routing to NPTracer
- start tracing numpy.rint and manage dtypes
- update BaseTracer to accept iterables as inputs, because NPTracer does
not get list givent the way numpy sends arguments to the functions
2021-08-11 14:20:42 +02:00
Arthur Meyre
19e68589d1 dev(numpy-dtypes): add some additional numpy dtype helper functions
- add function to convert a type from the project to a numpy dtype
- add function to manage numpy ufunc output dtypes
- add a check for integers to have positive bit_width
- add a check for floats to only accept 32 and 64 bits
2021-08-11 14:20:42 +02:00