Hi, I am writing the following heteroCL code, which can cause an overshift code. But there's no warning during the code generation . Is it possible to add overshift detections in the heteroCL.
import heterocl as hcl
import numpy
hcl.init()
def kernel(A, B):
hcl.update(B, lambda x: A[x] >> -9223372036854775808 )
A = hcl.placeholder((1,), "A", hcl.UInt(64))
B = hcl.placeholder((1,), "B", hcl.UInt(64))
s = hcl.create_schedule([A, B], kernel)
print(hcl.lower(s))
f = hcl.build(s, "vhls")
print(f)
void default_function(ap_uint<64> A[1], ap_uint<64> B[1]) {
int _top;
int update0;
update0_x: for (int x = 0; x < 1; ++x) {
B[x] = (A[x] >> -9223372036854775808);
}
}
Above is the output VHLS code, which could have undefined behaviors during execution:
Hi, I am writing the following heteroCL code, which can cause an overshift code. But there's no warning during the code generation . Is it possible to add overshift detections in the heteroCL.
Above is the output VHLS code, which could have undefined behaviors during execution: