hcl.print failure if the argument is a tuple with an int/float value.
jcasas00 opened this issue · 3 comments
jcasas00 commented
def kernel():
a = hcl.scalar(0, "a", 'int32')
b = 1
hcl.print((a.v,b), "FOO %d %d\n")
Generates the following error:
File "/home/jcasas/dprive/heterocl_mlir/hcl-dialect-prototype/build/tools/hcl/python_packages/hcl_core/hcl_mlir/build_ir.py", line 1511, in <listcomp>
self.operands = [v.result for v in val]
AttributeError: 'int' object has no attribute 'result'
Looks like if the args parameter to print is a tuple, hcl currently assumes all entries are hcl expressions.
zzzDavid commented
Fixed by cornell-zhang/heterocl@4b9d756
jcasas00 commented
Thanks. Works now.
zzzDavid commented
Closing the thread as the issue was fixed