Closed wrongtest-intellif closed 1 week ago
do u mind leave a quick comment about what will happen without this PR
do u mind leave a quick comment about what will happen without this PR
In the main branch, this case's indices would not change after narrowing with i32.
@T.prim_func
def before(A: T.Buffer((16,), "int64")):
for i in range(T.int64(15)):
A[i + T.int64(1)] = A[i] + T.int64(1)
The deduction chain is like below:
Fix an issue in
NarrowDataType
pass. When we perform narrowing on buffer indices, the integer bits constraint is irrelevant to buffer load value's integer bits. Thus it looks like we should reset the context bit info when traverse into the indices field.Another small change is in cast node rewrite, skip node construction when dtype actually matches.