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
The following script doesn't throw an overflow message,
import taichi as ti
ti.init(ti.vulkan, debug=True)
def test_add_overflow():
ty = ti.u8
num = 2 ** 7
@ti.kernel
def foo(num: ti.u32) -> ty:
a = ty(num)
b = ty(num)
return a + b
print(foo(num))
ti.sync()
test_add_overflow()
But this throws as expected:
import taichi as ti
ti.init(ti.vulkan, debug=True)
def test_add_overflow():
ty = ti.u8
num = 2 ** 7
@ti.kernel
def foo() -> ty:
a = ty(num)
b = ty(num)
return a + b
print(foo())
ti.sync()
test_add_overflow()
The text was updated successfully, but these errors were encountered:
The following script doesn't throw an overflow message,
But this throws as expected:
The text was updated successfully, but these errors were encountered: