Closed tonyjie closed 5 years ago
The problem is that you need to specify the data type of the HeteroCL array instead of the Numpy array. For example,
hcl.asarray(np.zeros(input.shape), dtype=hcl.Float())
The data type set by hcl.init()
has the highest priority. Maybe I can change this setting later but I need to think more.
The problem is that you need to specify the data type of the HeteroCL array instead of the Numpy array. For example,
hcl.asarray(np.zeros(input.shape), dtype=hcl.Float())
The data type set by
hcl.init()
has the highest priority. Maybe I can change this setting later but I need to think more.
It works. Thank you for helping me fix my bugs lol. I didn't find it because I think the IR generated is the same... When I specify the data type of numpy array, the IR said allocate sRGBtoLinear[float32 * 1280 * 768 * 3]
Thanks a lot!
The error message is:
You can reproduce it by the code below:
I don't know what is arg0, because I think all the data type is set to hcl.Float(), and it can be shown by IR presented. This error can be solved by replacing
hcl.init()
tohcl.init(hcl.Float())
. But I don't know where the wrong data type is.Thanks!