Commit Graph

105 Commits

Author SHA1 Message Date
Umut
0061e01d62 feat: implement checking coherence between inputset and parameters 2021-09-24 13:49:54 +02:00
Arthur Meyre
eaf8cfb933 tests: add function for ArbitraryFunction arbitrary_func equivalence
- this is not perfect but pretty close to the best we can do
2021-09-23 16:57:12 +02:00
Umut
e4a06116ec fix: inputset of test_mlir_converter for dot operation 2021-09-23 16:31:52 +03:00
Arthur Meyre
86052fa43d chore(tools): update command line for isort to follow the 100 line length 2021-09-23 14:00:07 +02:00
Umut
441c4f9e7d feat: check inputset size 2021-09-20 17:05:22 +03:00
Benoit Chevallier-Mames
0a6ebf3b19 workaround: make compilation work if table output is small
this workaround will be removed once it is managed by the compiler.
closes #279
refs #412
2021-09-17 18:47:43 +02:00
Benoit Chevallier-Mames
6a83b01e92 fix: check widths are supported by concrete-lib
and if not, explain to the user
refs #139
2021-09-17 12:32:37 +02:00
Benoit Chevallier-Mames
15aeb35529 fix: dot tests were using a single-element inputset
closes #372
2021-09-17 09:37:00 +02:00
Arthur Meyre
381c81b76c refacto: remove iter usage for passing a dataset
- it is still supported but not required and more confusing
2021-09-15 20:07:21 +02: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
Benoit Chevallier-Mames
e78086eefa feat: let's have a customizable assert
closes #245
2021-09-10 17:52:09 +02:00
youben11
845558d3a5 test: dot compilation and execution 2021-09-10 13:45:22 +01:00
Arthur Meyre
6fe809aece dev: add code to have the proper data type when getting an AF table
- update BaseDataType to store the underlying type constructor e.g. int
- add helper functions to get the type constructor for constant data
- update operator graph to fill the type constructor during bounds update
- add loguru as logger
- use type constructor in ArbitraryFunction.get_table, log an info if the
type_constructor of the input was None and default to int
2021-09-09 11:16:49 +02:00
Arthur Meyre
959328e0f5 chore: rename hdk to concrete first pass 2021-09-06 18:43:49 +02:00
Benoit Chevallier-Mames
150d33ba48 feat: make get_printable_graph give correct info for np.dot
closes #204
2021-09-06 11:57:45 +02:00
youben11
0fde0ae836 fix(tests): wasn't expecting bits to be update to max 2021-09-03 08:57:07 +01: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
Benoit Chevallier-Mames
cfe48cca15 test: add correctness tests for all supported ufunc's
closes #263
2021-09-02 16:00:33 +02:00
Arthur Meyre
9ffe9b667a refacto: fix missed renaming after bad merge 2021-09-02 14:27:19 +02:00
Arthur Meyre
bf2585ba0a refacto: rename hnumpy to numpy as requested for the package imports 2021-09-02 12:20:01 +02:00
Benoit Chevallier-Mames
e9c5ce27bb feat: factorize the ufunc management and add lot of ufunc's
refs #126
2021-09-02 10:46:31 +02:00
Umut
1e8debfb57 refactor: rename ClearValue/EncryptedValue to ClearScalar/EncryptedScalar 2021-09-01 15:33:19 +03:00
Benoit Chevallier-Mames
2badcecd0d feat: append \n instead of prepending it in get_printable_graph
closes #222
2021-09-01 10:23:14 +02:00
Umut
1fa049d914 feat: dump compilation artifacts automatically on compilation failures 2021-08-31 18:40:40 +03:00
Umut
02fbbfeaf7 test(drawing): crate test for saving the drawing 2021-08-31 18:40:40 +03:00
Benoit Chevallier-Mames
0d84f8c5f5 feat: adding exp functions in the managed operators
refs #126
closes #260
2021-08-31 17:24:30 +02:00
Benoit Chevallier-Mames
e90df9c0b7 feat: adding arcsin, arccos, arctan in the managed operators
refs #126
closes #257
2021-08-31 16:39:17 +02:00
Benoit Chevallier-Mames
4c77f08854 feat: adding tan in the managed operators
refs #126
closes #255
2021-08-31 16:39:17 +02:00
Benoit Chevallier-Mames
802f7943b1 feat: adding cos in the managed operators
refs #126
closes #235
2021-08-31 12:25:24 +02:00
youben11
784158741e feat(mlir): TLU conversion 2021-08-31 09:04:24 +01:00
Arthur Meyre
dbda93639b dev(ir): add get_table function to ArbitraryFunction node 2021-08-31 09:04:24 +01:00
Benoit Chevallier-Mames
809ce28b38 feat: an option to show MLIR
closes #224
2021-08-27 18:48:59 +02:00
Arthur Meyre
1b489b281c refactor: move is_equivalent to conftest.py for tests 2021-08-26 14:15:30 +02:00
Arthur Meyre
31259e556c refactor: remove the content= when adding nodes to a graph
- required by tests but can be done by the testing function itself
2021-08-26 11:25:55 +02:00
Benoit Chevallier-Mames
9a3e15e89a test: add tests of np.dot with compile_numpy_function_into_op_graph
closes #201
2021-08-26 09:37:31 +02:00
Arthur Meyre
ff260b2cd2 feat(nptracer): add dot tracing abilities
- remove no cover from Dot.label
- small refactor of BaseTracer to make _sanitize a class method
- small refactor of get_ufunc_numpy_output_dtype to manage funcs and ufuncs
- add function routing to NPTracer
- add dot tracing to NPTracer
- small refactor to get tracing functions for numpy funcs and ufuncs
2021-08-25 11:00:36 +02:00
Arthur Meyre
6d663ef63d dev(ir): add Dot IntermediateNode 2021-08-25 10:51:03 +02:00
Umut
b41029d9c0 refactor(drawing): start using graphviz for visualization 2021-08-25 10:01:20 +03:00
youben11
2585eb7ed8 tests: result correctness of the compiled function 2021-08-24 16:12:44 +01:00
Arthur Meyre
66d0c8dd62 feat(tracing): update hnumpy to manage tensor types
- binary ops and constants support
2021-08-24 16:00:42 +02:00
Arthur Meyre
96b04b45e1 refacto: rename check functions for values
- indicate the checks are for ScalarValues as we now have TensorValues
coming
2021-08-24 16:00:42 +02:00
Arthur Meyre
fc3ae6461c refacto: change the way mixing values is handled
- use an intermediate function that checks which mix function to use
- update function used in hnumpy tracing
2021-08-24 16:00:42 +02:00
Umut
1d5be5a1e7 refactor: re-organize data types and values 2021-08-24 16:13:36 +03:00
Umut
2b5f7f3118 refactor: rename ConstantInput to Constant to reduce confusion 2021-08-24 10:48:57 +03:00
Arthur Meyre
4e658c15cb feat: add TensorValue 2021-08-24 09:31:17 +02:00
Arthur Meyre
e41f77349f refactor: make BaseDataType __eq__ abstract
- update test files with dummy dtypes
2021-08-24 09:31:17 +02:00
Arthur Meyre
9a0c108d4b refactor: refactor ConstantInput to be flexible
- refactor to take a function to generate the propore BaseValue to store in
its output
- refactor BaseTracer to force inheriting tracers to indicate how to build
a ConstantInput tracer
- remove "as import" for intermediate in hnumpy/tracing.py
- update compile to manage python dtypes
2021-08-23 14:10:41 +02:00
Arthur Meyre
5048992707 refactor: properly manage unhandled operands in BaseTracer and NPTracer
- use the pythonic way of signaling unhandled operands
- change typing hint in NPTracer
2021-08-23 14:10:41 +02:00