Arthur Meyre
c9c7acf616
dev(floats): update function to mix types to support floats
2021-08-05 18:15:45 +02:00
Arthur Meyre
0c275c5f43
dev(floats): add Float class to represent a floating point value
2021-08-05 15:49:01 +02:00
Benoit Chevallier-Mames
1771bc6e52
fix: fix #80
...
closes #80
2021-08-05 11:30:45 +02:00
Benoit Chevallier-Mames
1ee8195af0
feat: supporting several outputs in print and draw of graphs
...
refs #76
2021-08-05 10:59:24 +02:00
Arthur Meyre
078c8dc8f1
fix: conform to more reasonable style to check type of object ( #78 )
2021-08-04 16:23:26 +01:00
Benoit Chevallier-Mames
6a80b065fc
test: testing eval_op_graph_bounds_on_dataset with multiple outputs
...
refs #74
2021-08-04 16:22:46 +02:00
Arthur Meyre
73f21c79a6
dev: add a function to check that a program is an actual integer program
2021-08-03 18:53:09 +02:00
Arthur Meyre
c6a2b4b35c
chore(reqs): update requirements
2021-08-03 18:35:12 +02:00
Benoit Chevallier-Mames
6157e4680b
feat: adding constant management
...
refs #49
2021-08-03 16:49:46 +02:00
Arthur Meyre
0baa02549c
build(mlir): setup things to use the MLIR/homomorphizer docker image
2021-08-03 16:03:56 +02:00
Arthur Meyre
a158b09f44
feat(bounds): add function to update OPGraph IR nodes in and output values
...
- this allows to have tighter data types by sticking to the smallest types
able to represent the ranges passed as argument
- update test_dataset_eval to check the output Value's data_type is updated
2021-08-03 11:33:13 +02:00
Arthur Meyre
b1a3b28a20
dev(dtypes): add a function to make Integers able to hold a set of values
2021-08-03 11:33:13 +02:00
Arthur Meyre
e55284b3ea
feat(bounds): add a way to evaluate an operator graph on a dataset
2021-08-02 13:01:52 +02:00
Arthur Meyre
9b52ea94fb
dev(opgraph): add a class to ease manipulating an operator graph
2021-08-02 13:01:52 +02:00
Arthur Meyre
be391ca388
chore: remove reference to package name and file paths
...
- avoids desync with the package name and file paths (which are unstable)
2021-08-02 13:01:52 +02:00
Benoit Chevallier-Mames
c91ee858c5
feat: adding a function to print a graph
...
refs #38
2021-07-30 14:44:22 +02:00
Benoit Chevallier-Mames
1196b00c6b
feat(debugging): implementing draw_graph
...
draw_graph is the function to show on a plot the traced function-to-compile
add edge numbers
refs #38
2021-07-30 11:00:35 +02:00
Arthur Meyre
8925fbd2db
dev(ir): add evalute to simulate the computation represented by IR nodes
2021-07-29 10:59:37 +02:00
Arthur Meyre
d739e6672d
dev(ordered-inputs): update code to keep the input index in Input IR nodes
...
- this input index will be useful for MLIR/lower level conversions
- it represents the input index of an Input node when considering the
traced function signature
- update code preparing function parameters to keep signature order
2021-07-29 10:59:37 +02:00
Arthur Meyre
5e5d0477b1
test: add argument annotation in parameter id for clear pytest logs
...
- sometimes arguments are re-ordered in the id written by pytest to sdtout
which makes identifying the failing case hard, this solves the issue for
one test function
2021-07-28 11:48:44 +02:00
Arthur Meyre
d7c1f42363
dev(dtypes): add functions to mix values and find dtype to hold two inputs
...
- allows to have a generic way of propagating types instead of deepcopying
input values and types in IR nodes
- supports only Integers for now
- opset checks will not be performed in those functions to keep knowledge
required on the opset to the MLIR conversion step or extra check steps
- use the mix_values_determine_holding_dtype in intermediate nodes where
appropriate
2021-07-28 11:48:44 +02:00
Arthur Meyre
a56a0dbf0c
dev(ir): make Input ir node accept a name
2021-07-28 11:48:44 +02:00
Arthur Meyre
f910f1fa9c
chore(tools): add user friendly coverage make command
...
- add a command allowing to run tests and coverage in one go
2021-07-27 12:14:42 +02:00
Arthur Meyre
95f05800d5
chore(tools): allow to have fixmes in the code without failing CI
2021-07-27 12:14:34 +02:00
Benoit Chevallier-Mames
f2140423b7
feat: adding management of Sub and Mul
...
tests: add the possibility to test more binary operations
avoid copy-paste for binary ops, with just an option if the operation is commutative or not
refs #41 , #42
2021-07-27 12:10:30 +02:00
Arthur Meyre
deb7631a3a
chore(tools): add mypy_test and mypy_ci target
...
- update tests that were failing with new mypy check
- mypy_test runs mypy on all .py source files in tests
- mypy_ci runs mypy and mypy_test, mypy is for source i.e. hdk/ only
2021-07-26 18:28:39 +02:00
Arthur Meyre
b883995911
docs(dev): update frontend flow file
...
- use feedbacks and re-evaluate with experience building the numpy tracing
2021-07-26 17:18:04 +02:00
Arthur Meyre
a060aaae99
feat(tracing): add tracing facilities
...
- add BaseTracer which will hold most of the boilerplate code
- add hnumpy with a bare NPTracer and tracing function
- update IR to be compatible with tracing helpers
- update test helper to properly check that graphs are equivalent
- add test tracing a simple addition
- rename common/data_types/helpers.py to .../dtypes_helpers.py to avoid
having too many files with the same name
- ignore missing type stubs in the default mypy command
- add a comfort Makefile target to get errors about missing mypy stubs
2021-07-26 17:05:53 +02:00
Arthur Meyre
b45944b66a
dev(ir): add the basis for the frontend IR
...
- add IntermediateNode base class
- add Add
- add Input
2021-07-26 17:05:53 +02:00
Arthur Meyre
29c1641f48
dev: remove unique_id system, not needed for now
...
- wrong assumption when reading hnp's code, for now unique ids are not
needed
2021-07-26 17:05:53 +02:00
Arthur Meyre
1a54bc1f22
dev(data-types): create Value classes which represent values in a program
...
- value classes have a data_type member to know what they hold
- add __repr__ to a few classes to ease readability for debug/print
- add helper functions to perform value checks that will be used for
tracing to ease readability
- add unit tests to get 100% coverage
2021-07-26 17:05:53 +02:00
Arthur Meyre
063b2db9db
feat(data-types): add skeleton of data types, add an Integer type
...
- add convenience functions to instantiate Integer
- add tests for the basic functions of integers
2021-07-26 17:05:53 +02:00
Arthur Meyre
ce358ca838
tests: add test helper to compare digraphs
...
- add test to check that the helper is working
2021-07-26 17:05:53 +02:00
Arthur Meyre
42e9b8af2c
chore: change requirements to be able to use networkx for graph handling
...
- support only Python >= 3.7, numpy is also dropping support for 3.6
2021-07-26 17:05:53 +02:00
Arthur Meyre
94f79f2345
chore(tools): update coverage.sh script
2021-07-22 10:31:51 +02:00
Arthur Meyre
2208a87327
chore(git): ignore output file for diff-coverage
2021-07-22 10:31:51 +02:00
Arthur Meyre
ac31a712ca
chore(build): update a CI command to properly call pip
2021-07-22 10:31:51 +02:00
Arthur Meyre
9bf380bfce
fix(typo): fix unfortunate typos
2021-07-19 16:32:53 +02:00
Arthur Meyre
36d93a60d9
chore(tools): add mypy as dev tool but don't check in CI for now
...
- we'll see if the benefits of static typing are worth it or not
2021-07-19 16:25:24 +02:00
Arthur Meyre
e0c838b230
chore(tools): a less annoying pylint
...
- allow 1 letter names
- no minimum on class public methods
2021-07-16 12:26:52 +02:00
Arthur Meyre
ef78e66241
build(coverage): add comment to PR with diff-cover output
...
- add script to help format the coverage comment
- manage steps logic
refs #15
2021-07-16 12:25:10 +02:00
Arthur Meyre
7dccfa649c
build(tests): add tests and coverage to CI workflow
...
#refs 15
2021-07-16 12:25:10 +02:00
Arthur Meyre
a2185af578
tests: add test structure and dependencies
...
- add unique ID generator to hdk and unit test it
refs #15
2021-07-16 12:25:10 +02:00
aquint-zama
ae992e4cdc
docs: move to sphinx
...
relates #15
2021-07-15 16:56:53 +02:00
Arthur Meyre
e45cd6cc86
build: add github actions workflow for PR checks
...
refs #15
2021-07-15 15:31:53 +02:00
Arthur Meyre
58e35136f5
chore(tools): add Makefile, formatting script, pylintrc and dependencies
...
refs #15
2021-07-15 11:46:19 +02:00
Arthur Meyre
8c61a12581
chore(tools): setup poetry and bare hdk package
...
refs #15
2021-07-15 11:09:17 +02:00
Arthur Meyre
68a6244593
docs(dev): add ARCHITECTURE.md and initial frontend flow
2021-07-15 11:00:42 +02:00
Arthur Meyre
2365a34b2a
chore(tooling): add .editorconfig
2021-07-15 10:55:55 +02:00
Arthur Meyre
ae2041202f
chore: add github issue templates
2021-07-15 10:55:22 +02:00