hcl.asarray doesn't support string dtype
jcasas00 opened this issue · 2 comments
jcasas00 commented
hcl_res = hcl.asarray(np.zeros((2,), dtype=np.uint32), dtype='uint32')
generates the following error:
hcl_res = hcl.asarray(np.zeros((2,), dtype=np.uint32), dtype='uint32')
File "python/heterocl/operation.py", line 45, in asarray
raise RuntimeError("Should provide hcl.Type. Got string")
RuntimeError: Should provide hcl.Type. Got string
This works on the main branch.
zzzDavid commented
Fixed by cornell-zhang/heterocl@776e890. Test cases to be added.
zzzDavid commented
Test case is added at mlir/test_api.py::test_str_fmt_asarray
with this commit: cornell-zhang/heterocl@9dd6994