With this PR, now users can create a HeteroCL tensor from a Python list or a Numpy array by using the existing hcl.copy API. An example is shown below.
arr = [[1, 2, 3], [4, 5, 6]]
A = hcl.copy(arr, "A", hcl.Int())
s = hcl.create_schedule([A])
The arr in the above example can also be a Numpy array. More examples can be seen under the tests folder.
With this PR, now users can create a HeteroCL tensor from a Python list or a Numpy array by using the existing
hcl.copy
API. An example is shown below.The
arr
in the above example can also be a Numpy array. More examples can be seen under the tests folder.