pulp-platform / dory

A tool to deploy Deep Neural Networks on PULP-based SoC's
Apache License 2.0
76 stars 22 forks source link

Refactor Template writer #59

Closed lukamac closed 1 year ago

lukamac commented 1 year ago

Extracted the template writing from Layer2D_template_writer so that I can change the template name. For GAP9 w/ NE16 I will have 2 templates, one for convolution on the cluster and the other on the NE16 so this will enable to choose the template.

Furthermore, extracted a few more functions in the HW_Parser so they can be overriden, e.g. l2_template_keywords, l2_template_mapping, l2_c_template.

Additionally, I accidentally found out about the very useful "strict_undefined" flag for Mako templates which unfortunately doesn't work for us because of the way our templates are written at the moment. I left a comment for anyone who stumbles upon it in the future.