cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
326 stars 92 forks source link

Printing objects in HeteroCL #174

Closed seanlatias closed 4 years ago

seanlatias commented 4 years ago

HeteroCL now cannot print intermediate values, which makes it hard for debugging. It would be good to have something like hcl.print. For example,

A = hcl.placeholder((10,))
B = hcl.compute(A.shape, lambda x: A[x]+1)
hcl.print(B) // print the entire tensor
hcl.print(B[0]) // print element
seanlatias commented 4 years ago

Solved by #178.