Xilinx / finn-base

Open Source Compiler Framework using ONNX as Frontend and IR
https://finn-base.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

Added support for cost estimation for upsampling #37

Closed heborras closed 3 years ago

heborras commented 3 years ago

Hi,

for estimating the cost of a network, which included upsampling layers I implemented a cost estimation function for this ONNX node type.

Currently the estimation supports the upsampling modes "nearest" and "linear". For "nearest" no further MAC cost is assumed, as in theory values only need to be copied over, but not changed. For "linear" I assumed two MACs per dimension in which is upsampled, multiplied with the number of output pixels. Please check that this is sound.

It would be great if this cost estimation could be included into the branch for the ITU competition, as teams might want to use the operation as well.

maltanar commented 3 years ago

Thanks @HenniOVP, I had a look and the compute cost for the nearest-neighbor and linear-interpolation modes that you suggested seem reasonable. I'm changing the base branch to feature/qonnx_compute_cost since that is essentially acting as the dev branch for the ITU competition branch at the moment.