spcl / daceml

A Data-Centric Compiler for Machine Learning
https://daceml.readthedocs.io
BSD 3-Clause "New" or "Revised" License
81 stars 14 forks source link

Initial FPGA Support #40

Closed TizianoDeMatteis closed 3 years ago

TizianoDeMatteis commented 3 years ago

This PR includes several ONNX Node expansions specifically tailored for FPGA, in particular IntelFPGA.

TizianoDeMatteis commented 3 years ago

Can we add the testing script to the CI?

Similarly to what is done with Dace, we would need to set up an access to an external machine where we have installed all the FPGA software. @tbennun do you think this is possible?

orausch commented 3 years ago

we would need to set up an access to an external machine where we have installed all the FPGA software

The GPU tests run on the same machine as in Dace

TizianoDeMatteis commented 3 years ago

Then yes, definitely

codecov[bot] commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@5b43e45). Click here to learn what that means. The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #40   +/-   ##
=========================================
  Coverage          ?   87.95%           
=========================================
  Files             ?       51           
  Lines             ?     5310           
  Branches          ?        0           
=========================================
  Hits              ?     4670           
  Misses            ?      640           
  Partials          ?        0           
Impacted Files Coverage Δ
daceml/onnx/binary_utilities/op_checker.py 100.00% <ø> (ø)
...ml/onnx/op_implementations/fpga_implementations.py 90.23% <ø> (ø)
daceml/pytorch/module.py 85.43% <ø> (ø)
daceml/transformation/__init__.py 100.00% <ø> (ø)
daceml/transformation/reshape_elimination.py 26.51% <26.51%> (ø)
...ml/onnx/op_implementations/pure_implementations.py 81.82% <82.50%> (ø)
daceml/util/utils.py 91.38% <95.24%> (ø)
daceml/autodiff/backward_pass_generator.py 93.52% <100.00%> (ø)
daceml/onnx/forward_implementation_abc.py 95.65% <100.00%> (ø)
daceml/onnx/nodes/onnx_op.py 94.24% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5b43e45...6070334. Read the comment docs.

TizianoDeMatteis commented 3 years ago

@orausch I've fixed this, but the error seems to persist. It is raised even if I explicitly ignore the fpga test directory with pytest.

How did you test it locally?

orausch commented 3 years ago

Atleast two of the errors are due to a strict transform error that is also currently broken on master. I believe Tal is working on it

orausch commented 3 years ago

@TizianoDeMatteis Seems like the main reason for the bad coverage is because reshape elimination is not tested