cornell-zhang/hcl-dialect

hcl.asarray doesn't support string dtype

jcasas00 opened this issue · 2 comments

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.

Fixed by cornell-zhang/heterocl@776e890. Test cases to be added.

Test case is added at mlir/test_api.py::test_str_fmt_asarray with this commit: cornell-zhang/heterocl@9dd6994