You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def test_bitnot():
hcl.init()
rshape = (1,)
def kernel():
r = hcl.compute(rshape, lambda _:0, dtype=hcl.UInt(32))
a = hcl.scalar(10, "a", dtype='uint32')
r[0] = ~a.v
return r
#
s = hcl.create_schedule([], kernel)
print(hcl.lower(s))
hcl_res = hcl.asarray(np.zeros(rshape, dtype=np.uint32), dtype=hcl.UInt(32))
f = hcl.build(s)
f(hcl_res)
generates error:
r[0] = ~a.v
File "/home/jcasas/dprive/heterocl_mlir/hcl-dialect-prototype/build/tools/hcl/python_packages/hcl_core/hcl_mlir/build_ir.py", line 626, in __invert__
raise HCLNotImplementedError("__invert__ is not implemented")
The text was updated successfully, but these errors were encountered:
Right, this is a workaround. We probably need to provide our own bitwise NOT op. Using other bitwise ops to implement NOT is fine for the LLVM backend, but not a good solution for HLS.
generates error:
The text was updated successfully, but these errors were encountered: