In this PR, we introduce a new API hcl.print, which can print HeteroCL objects. Currently, the functionality is still very basic. In other words, we cannot generate pretty print like NumPy.
I also removed the need for using hcl.Stage at the top-level. A default top-level Stage will be generated automatically. Please refer to test_dsl_basic.py for more examples.
As can be seen from the example above, currently we do not have pretty print with indentations and also find the largest common number of digits. This will be introduced later.
Main Features
hcl.print
, which can print HeteroCL objects. Currently, the functionality is still very basic. In other words, we cannot generate pretty print like NumPy.hcl.Stage
at the top-level. A default top-level Stage will be generated automatically. Please refer totest_dsl_basic.py
for more examples.Examples for
hcl.print
More details: for integers, by default we use "%d". For all other data types including floating points and fixed points, we use "%f".
As can be seen from the example above, currently we do not have pretty print with indentations and also find the largest common number of digits. This will be introduced later.