Commit Graph

158 Commits

Author SHA1 Message Date
Arthur Meyre
3c6969f7f4 tools: updated package watcher with helper script 2021-08-31 16:15:03 +02:00
Arthur Meyre
135805a1b9 tools: make matplotlib work inside the dev docker
- use special DNS from docker
- install tkinter
- use proper matplotlib backend
- add instructions to install xserver in docs/dev/GETTING-STARTED.md
2021-08-31 14:57:20 +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
Arthur Meyre
758a5727dc fix: disable the package watcher for now
- I used the wrong date value, will update in a further PR
2021-08-31 11:43:32 +02:00
youben11
e408b292d3 ci: pulling latest image when building docker img 2021-08-31 10:12:10 +01:00
Arthur Meyre
b9fd9b7b9b fix: bad workflow format 2021-08-31 10:36:42 +02:00
Arthur Meyre
0f2b7f7d2a build: allow docker base image build triggered by API call
- add a polling script to check packages versions regularly and rebuild if
the compiler image is more recent
2021-08-31 10:14:55 +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
Arthur Meyre
74f0c9600e fix: update LD_PRELOAD in docker image and workflows 2021-08-30 18:13:55 +02:00
Arthur Meyre
c907cd0470 docs: float fusing explanation 2021-08-30 18:02:58 +02:00
Benoit Chevallier-Mames
809ce28b38 feat: an option to show MLIR
closes #224
2021-08-27 18:48:59 +02:00
Arthur Meyre
61daa49e9d fix(tools): update Makefile targets to allow make binary path with spaces
- avoids issues if the make binary path contains spaces
2021-08-26 15:31:58 +02:00
Arthur Meyre
3541e4ff4e fix(tools): various Makefile improvements
- sync output recursively for make calls
- add a script to get the number of cpus on mac and linux
- Makefile formatting
- update serialize_targets.sh to invoke the proper make binary
- Add instructions to install make
2021-08-26 14:32:18 +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
1ebbd3ea91 fix(build): only allow one Docker image build per ref/branch 2021-08-25 16:22:46 +02:00
aquint-zama
0f7f5a302a chore(templates): update issue templates
refers #129
2021-08-25 14:28:52 +02:00
Arthur Meyre
202dffb4a5 Build/env dev docker 127 (#196)
build: add workflow to create HDK env Docker Image

- make bot username a secret
- update Makefile to pull the HDK image
- have a separate Makefile for the dev specific Docker Image needs
2021-08-25 14:09:54 +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
Arthur Meyre
4655bea987 fix: register IR nodes to check when nodes are missing debug draw colors 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
Arthur Meyre
cc1221eac5 dev(bounds): add custom min and max func callbacks to manage foreign types
- allows us to pass a specialized function to estimate min and max for e.g.
numpy and/or torch tensors
2021-08-24 16:00:42 +02:00
Arthur Meyre
30e00df977 chore(tools): update pylint target to lint dirs separately
- avoids triggering duplicate code detection between hdk tests and
benchmarks
- update helper script serialize_targets.sh to avoid printing dir
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
4b3fb772b8 chore: integrate checking whether notebooks are sanitized into the pcc target 2021-08-24 10:56:54 +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
985cf973d8 refactor: values.py
- change import for BaseDataType
- create helper functions rather than partials to have docstrings in IDE
hints
2021-08-24 09:31:17 +02:00
Arthur Meyre
0e1534637b fix: BaseValue now deepcopies the data_type it receives
- avoids weird situations with refs to a type that gets modified
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
7a0f11b1b0 refactor: change IR and BaseTracer to support any input mixing function
- prepares support for tensor types
- introduce _n_in and n_in() and requires_mix_values_func() for
IntermediateNode to know if they require a function to mix input values and
determine output value
- update BaseTracer to pass the class _mix_values_func to IntermediateNodes
that need it
- update NPTracer to stay consistent with current behavior regarding values
mixing
2021-08-23 14:10:41 +02:00
Arthur Meyre
78480e5da7 refactor: make IR agnostic of clear/encypted values 2021-08-23 14:10:41 +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
c528d72e62 refactor: remove Scalars type hint
- add a helper function to determine BaseDataType of a constant python
scalar, int or float in dtype_helpers.py
- make BaseTracer type agnostic
- make ConstantInput type agnostic
2021-08-23 14:10:41 +02:00
Arthur Meyre
5e258ca443 refactor: change type hints in IntermediateNode evaluate 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
Arthur Meyre
a4181afe4d refactor: refactor np_dtype_helpers.py
- rename convert_numpy_dtype_to_common_dtype to
convert_numpy_dtype_to_base_data_type
- change names of constants to be clearer
2021-08-23 14:10:41 +02:00
Arthur Meyre
4f103e604a refactor: update OPGraph to be able to update bounds with foreign types
- get BaseDataType for values being checked in update_values_with_bounds
- rename SUPPORTED_TYPES to BASE_DATA_TYPES
2021-08-23 14:10:41 +02:00
Arthur Meyre
60daf31981 refactor: refactor make_integer_to_hold_ints
- rename make_integer_to_hold_ints to make_integer_to_hold
- accept any values as input as we don't know which type this function will
be called with
- rename get_bits_to_represent_int to
get_bits_to_represent_value_as_integer
2021-08-23 14:10:41 +02:00
Arthur Meyre
0ff3ae4795 refactor: refactor BaseValue and mix_values_determine_holding_dtype
- add _is_encrypted to BaseValue
- remove EncryptedValue and ClearValue classes
- add a ScalarValue class
- add two helpers EncryptedValue and ClearValue which create a ScalarValue
either encrypted or not when passed a data_type
- rename to mix_scalar_values_determine_holding_dtype
- change typing
2021-08-23 14:10:41 +02:00
Arthur Meyre
371ecae801 tests: do not test BaseValue __repr__ anymore 2021-08-23 14:10:41 +02:00
Arthur Meyre
f91092ac38 tools: update pytest make target to have a report on coverage
- allows to have coverage information without using make coverage
- make coverage remains recommended to check a commit's content
2021-08-20 09:53:02 +02:00
Arthur Meyre
6959fdf7e7 chore(tools): only make setup_env in dev docker if venv does not exist 2021-08-20 09:46:33 +02:00