Commit Graph

23 Commits

Author SHA1 Message Date
Arthur Meyre
f1ed07d580 refactor(tracing): add generic tracing functions for generic functions
- remove nearly duplicated code when tracing GenericFunction for unary and
binary operators

refs #965
2021-11-23 13:55:37 +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
Umut
6fec590e65 refactor(debugging): re-write graph formatting 2021-11-15 16:33:15 +03: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
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
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
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
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
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
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
Benoit Chevallier-Mames
6e79c0baf5 test(ci): more random inputs
more random-looking inputs in subtest_fuse_float_binary_operations_correctness and
subtest_fuse_float_unary_operations_correctness
closes #547
2021-10-13 15:09:36 +02:00
Arthur Meyre
44016cc80c feat: manage float fusing for tensors
- add op_attributes on ArbitraryFunction
- this works if all constants are smaller than the input tensor
- otherwise it requires more advanced code and a concatenate operator which
currently does not exist
2021-10-11 10:42:20 +02:00
Benoit Chevallier-Mames
e8114cc470 feat: add management of boolean binary operators with a const scalar
refs #126
refs #529
2021-10-08 15:31:04 +02:00
Benoit Chevallier-Mames
2da3895f1a feat: add more bivariate operations
which are supported if one of the operands is a constant
refs #126
2021-10-07 16:14:07 +02:00
Benoit Chevallier-Mames
56e0ed4a11 feat: manage binary op where one input is constant
feat #126
2021-10-06 17:53:52 +02:00
Arthur Meyre
a9d44f4758 feat(float_fusing): restrict to scalars before supporting tensors 2021-09-30 10:57:00 +02:00
Arthur Meyre
959328e0f5 chore: rename hdk to concrete first pass 2021-09-06 18:43:49 +02: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
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
Umut
1d5be5a1e7 refactor: re-organize data types and values 2021-08-24 16:13:36 +03:00
Arthur Meyre
4e40982f5a feat(float-fusing): fuse float parts of an OPGraph during compilation
- this allows to be compatible with the current compiler and squash float
domains into a single int to int ArbitraryFunction
2021-08-17 18:27:31 +02:00