Commit Graph

210 Commits

Author SHA1 Message Date
Benoit Chevallier-Mames
2fdf22bf4e test(execution): add correctness tests of ndarray operators
closes #931
2021-11-18 18:16:33 +01:00
jfrery
a5b1d6232e feat: add signed intergers quantization 2021-11-18 17:21:28 +01:00
Benoit Chevallier-Mames
4c6e1661ec feat(tracing): add support for more arithmetic operators, when one input is a constant
refs #218
refs #751
2021-11-18 13:46:14 +01:00
Arthur Meyre
507ccd05c5 feat: static post training quantization and quantization module 2021-11-18 10:31:45 +01:00
Benoit Chevallier-Mames
bfa309a455 test: add tests with dot and negative tensors
refs #891
2021-11-18 09:55:22 +01:00
Arthur Meyre
f6aadd37e9 test: add tests for bivariate functions with tensor and multi TLU
closes #558
closes #567
closes #665
2021-11-18 09:08:55 +01:00
Arthur Meyre
ff03bc2220 feat(optimization): support more fusing topologies
- corrected docstring that was mistaken on what was returned
- updated pyproject.toml to ignore warnings that happened naturally in
networkx and that was blocking proper test execution (no way around that
this is code from networkx that triggered the warning)
- add a test case for the newly supported fusing topology

closes #499
2021-11-18 09:08:50 +01:00
Arthur Meyre
bc145e21e1 feat: allow tracing __eq__ while keeping hashing when not tracing
closes #936
2021-11-18 09:08:43 +01:00
jfrery
c978107124 feat: remove transpose from layers 2021-11-17 14:54:16 +01:00
Benoit Chevallier-Mames
a712b0573c feat: add support for comparators when one input is a constant
closes #932
refs #751
2021-11-17 13:50:18 +01:00
Umut
c733daa78c feat(mlir): implement MLIR conversion of MatMul 2021-11-17 15:01:29 +03:00
Benoit Chevallier-Mames
05cacc8744 feat(tracing): let's trace k<<x and k>>x
closes #915
2021-11-17 12:50:59 +01:00
Umut
1d691f232b feat(mlir): implement MLIR conversion of multi lookup tables 2021-11-17 14:27:47 +03:00
Benoit Chevallier-Mames
78f82fb9a1 chore: remove useless variables that make pcc didn't see 2021-11-17 11:01:57 +01:00
Benoit Chevallier-Mames
5448669e83 chore: split test_tracing
closes #913
2021-11-17 10:10:05 +01:00
Arthur Meyre
55a39d4c26 test: run single lut conformance on tensors
closes #574
refs #558
refs #665
2021-11-17 09:11:46 +01:00
Benoit Chevallier-Mames
a2a61a079f feat(tracing): add support for ndarray functions
ndarray.flatten
ndarray.__abs__
ndarray.__neg__, __pos__ and __invert__
ndarray.__rshift__ and __lshift_

refs #751
refs #218
2021-11-16 18:36:14 +01:00
Umut
db098fd3a3 refactor(debugging): improve error messages of generic functions with floating point inputs 2021-11-16 13:18:13 +03:00
Umut
46a018fd21 refactor: use a consistent short name for operation graph 2021-11-16 12:10:48 +03:00
Benoit Chevallier-Mames
5d31aa4d2c chore: factorize some data_gen. 2021-11-15 16:46:46 +01:00
Benoit Chevallier-Mames
50c1ceb6db test(execution): add tests with negative results
for now, results are correct mod 128, but wrong without this modulo reduction. Will be later fixed
by the compiler.

closes #844
refs #845
2021-11-15 16:46:46 +01:00
Umut
239f66eb46 refactor(mlir): re-write mlir conversion 2021-11-15 17:21:51 +03:00
Umut
6fec590e65 refactor(debugging): re-write graph formatting 2021-11-15 16:33:15 +03:00
Umut
b449ddc360 refactor(debugging): improve error message of unfused astype 2021-11-15 12:50:46 +03:00
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