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
As the log shows, print(f[i]) is optimized to print(100 * i); however, f[i] is a 4-bit integer here, so the actual value of f[i] is wrapped and does not equal to 100 * i.
I think this can lead to some bugs that cannot be easily discovered in practice, and there should be a way to handle this.
The text was updated successfully, but these errors were encountered:
Describe the bug
Code optimization leads to unexpected values when using quantized types.
To Reproduce
Log/Screenshots
Additional comments
As the log shows,
print(f[i])
is optimized toprint(100 * i)
; however,f[i]
is a 4-bit integer here, so the actual value off[i]
is wrapped and does not equal to100 * i
.I think this can lead to some bugs that cannot be easily discovered in practice, and there should be a way to handle this.
The text was updated successfully, but these errors were encountered: