Benoit Chevallier-Mames
e7e7a02425
test(execution): add tests with negative values
...
closes #844
2021-11-15 10:15:49 +01:00
Benoit Chevallier-Mames
1394dd6db5
chore: clarify these tests a bit
2021-11-15 10:10:58 +01:00
Arthur Meyre
93820e1588
feat: add support for __floordiv__
...
closes #871
closes #872
2021-11-11 09:42:02 +01:00
jfrery
c5952cd09f
feat: add quantization utilities
2021-11-10 18:25:31 +01:00
Benoit Chevallier-Mames
1aad4d23d1
chore: be more verbose in this assert
...
closes #729
2021-11-10 17:31:08 +01:00
Arthur Meyre
955470fb89
feat: add support for __truediv__
...
- cannot use the standard binary op workflow as we don't have an op for div
closes #866
closes #867
2021-11-10 15:07:59 +01:00
Umut
ee202a03b3
feat(mlir): implement mlir conversion of basic tensor operations
2021-11-10 10:18:36 +03:00
Arthur Meyre
565756810d
feat: add neg support to BaseTracer
...
closes #853
2021-11-09 18:02:59 +01:00
jfrery
fac7c9c954
feat: conversion from torch.nn.Module to numpy.
2021-11-09 11:02:48 +01:00
Umut
548b755409
fix(fhe_circuit): update type annotations for run method
2021-11-08 16:50:24 +01:00
Umut
f417246ea3
refactor(debugging): rename get_printable_graph to format_operation_graph
2021-11-08 13:20:18 +03:00
Arthur Meyre
b716ddcf76
feat: clear error message when a constant shape is preventing float fusing
...
- happens when a constant is bigger than the variable input of the
subgraph, would require special handling, hard to write and requires a
concatenation/stacking operator see #587
closes #645
2021-11-04 16:55:14 +01:00
Arthur Meyre
fae89bd452
refactor: add python generic helpers
...
- move catch and update_and_return_dict there
2021-11-04 16:55:14 +01:00
Arthur Meyre
f530a0b739
refactor: make GenericFunction accept several inputs
...
- remove baked constants
- manage table generation for the updated node
closes #600
closes #822
2021-11-04 14:47:10 +01:00
Arthur Meyre
bff367137e
refactor: update GenericFunction to take an iterable as inputs
...
- also fix some corner cases in memory operations
- some small style changes
refs #600
2021-11-04 09:43:22 +01:00
Arthur Meyre
d2faa90106
refactor: replace UnivariateFunction by GenericFunction
...
- add an attribute fusable to False for the operations that should not be
explicitely fused from the original addition of GenericFunction
- add op_kind instance attribute to differentiate between TLU and memory
operations for GenericFunction
refs #600
2021-11-03 12:05:02 +01:00
Arthur Meyre
fed3342c5f
fix(tracing): fix a corner case for astype on arrays with 1 element
2021-11-03 12:05:02 +01:00
Benoit Chevallier-Mames
50a6b06c37
feat(tracing): support x.reshape as well as np.reshape(x, )
...
closes #701
2021-11-03 11:01:06 +01:00
Benoit Chevallier-Mames
3991ed3b38
chore: np.tranpose, np.reshape and np.ravel don't compile currently.
2021-11-02 16:18:55 +01:00
Benoit Chevallier-Mames
086dba4194
feat: management of reshape
...
refs #615
closes #786
2021-11-02 14:55:27 +01:00
Umut
39c16038c7
feat(extensions): create multi table lookup extension
2021-11-02 15:45:13 +03:00
Benoit Chevallier-Mames
8123a5ef45
feat: implement a generic node for functions which change shape
...
and implement np.transpose with it
and implement np.ravel with it
refs #745
2021-11-02 11:20:48 +01:00
Arthur Meyre
212dc36382
feat: emit loguru warning with reason for subgraph not fusing
...
- catches cases with more than one variable input
- catches cases where the shapes are not the same in intermediate nodes
refs #645
2021-10-28 14:36:12 +02:00
Arthur Meyre
ce17767288
test: use triple quoted strings for long message matches
...
closes #754
2021-10-28 09:13:48 +02:00
Benoit Chevallier-Mames
23d4dead30
chore: remove unnecessary lambda in tests
2021-10-27 18:47:56 +02:00
Umut
eedbe0606b
feat(tracing): implement tracing of matmul
2021-10-27 17:11:19 +03:00
Umut
118e6454b7
test(tracing): fix shape mismatch in one of the dot tracing tests
2021-10-27 17:11:19 +03:00
Arthur Meyre
ecfde7b233
refactor(debugging): accept several highlights per node when printing
...
refs #645
2021-10-26 17:19:33 +02:00
Umut
70fbac7188
feat(compilation): provide a way to automatically generate a random inputset
2021-10-26 11:44:57 +03:00
Benoit Chevallier-Mames
9459675cfb
feat: manage signed constants
...
closes #688
closes #612
2021-10-26 10:06:15 +02:00
Arthur Meyre
624143106f
refactor(compilation): remove unnecessary check in compile.py
...
refs #645
2021-10-25 17:02:43 +02:00
Umut
c46d96aabf
refactor(compilation): improve error messages of indexing
2021-10-25 17:35:36 +03:00
Umut
65af96253b
feat(tracing): implement tracing of constant indexing
2021-10-25 13:14:29 +03:00
Arthur Meyre
9a41a57be0
fix: report the correct coverage status on exit
...
closes #719
2021-10-22 18:40:14 +02:00
Arthur Meyre
fbfaeb2b17
feat: add table deduplication to NPMLIRConverter
...
closes #560
closes #561
2021-10-22 18:19:44 +02:00
Benoit Chevallier-Mames
bc90ed37ff
chore(debugging): show problems in a clearer way with highlighted_nodes
2021-10-22 14:41:24 +02:00
Umut
be453394fb
fix(compilation): raise the appropriate error for intermediate signed integers
2021-10-20 17:15:52 +03:00
Benoit Chevallier-Mames
7bf2f09615
feat: remove support for np.invert
...
remove support for np.invert and propose to the user to use bitwise_xor instead, because of impossibilities with float fusing
closes #658
2021-10-19 10:40:23 +02: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
Arthur Meyre
bc2ae7be47
chore: disable pylint line too long in test_compile where necessary
...
- fix pylint targets for non package dirs
2021-10-15 16:02:20 +02:00
Umut
8b2efb8869
test(execution): add table lookup correctness tests
2021-10-15 16:16:32 +03:00
Arthur Meyre
93e39e58f7
fix(representation): handle failure in UnivariateFunction get_table
...
- if only some values are problematic, flood fill the resulting table with
other valid values
- if no valid value was generated an AssertionError will be thrown
2021-10-15 14:17:11 +02:00
Benoit Chevallier-Mames
1c8c623951
test: deal with probabilistic nature of correctness tests
...
closes #656
refs #551
2021-10-15 13:10:15 +02:00
Arthur Meyre
a811b588c6
test: fix ldexp correctness test by changing the input type
2021-10-15 12:54:44 +02:00
Umut
73769b917e
feat(compilation): provide the reason for MLIR incompatibility
2021-10-15 13:06:36 +03:00
Umut
4c9c49ecd2
feat(debugging): provide a way for highlighting nodes with custom messages during printing
2021-10-15 13:06:36 +03:00
Benoit Chevallier-Mames
12465f86ac
test: check correctness of ufunc's
...
for the moment:
- it has no hard check of correctness for now
- some functions are not managed
ref #551
2021-10-14 19:54:31 +02:00
Arthur Meyre
95c48a419c
refactor(tracing): preparatory work for tensor table generation
...
- removed underlying_type_constructor from BaseDataType as it was scalar
specific and put it in values
- update inputset_eval to keep a sample of intermediate node values
- allows to get the proper value constructor to be used in
UnivariateFunction get_table and have tensors as inputs
2021-10-14 10:53:21 +02:00
Benoit Chevallier-Mames
67a9bf12ca
test: make that the tested function has integer inputs
...
functions that we compile are supposed to have integer inputs and outputs
2021-10-13 15:09:36 +02:00