Can't not create a expr to compare with int32 min


#1

What I want to do is to check whether a number equals to min of int32, but I got this error with following code: “unknown intrinsic signed_integer_overflow”

How can I create such kind of checking? Thanks a lot

import numpy as np
import tvm

ii32 = np.iinfo(np.int32)

shape = tvm.const(1, dtype="int32")
input = tvm.placeholder(shape, dtype='int32', name="input")

C = tvm.compute((1,), lambda i: input[i] == ii32.min, name="C")

s = tvm.create_schedule(C.op)

print(tvm.lower(s, [input, C], simple_mode=True))
tvm.build(s, [input, C])