The result of adaptive_avg_pool op, with dtype int8, is different in each run

The following is an example:

dtype = "int8"
dshape = (1, 1, 1, 32, 32)
out_size = (1, 2, 2)
layout = "NCDHW"
x = relay.var("x", shape=dshape, dtype=dtype)
y = relay.nn.adaptive_avg_pool3d(x, out_size, layout)
func = relay.Function([x], y)
half = 2**(int(re.search(r'\d+$',dtype).group())-1)
x_np = np.random.randint(1, half-1, shape, dtype)*np.random.choice([-1,1],shape).astype(dtype)
np.savetxt("x_np.npy", x_np.flatten())
x_np = np.loadtxt("x_np.npy").reshape(dshape).astype(dtype)
inputs = {"x":tvm.nd.array(x_np)}
mod = tvm.IRModule().from_expr(func)
params = {}
with tvm.transform.PassContext(opt_level=2):
   exe = relay.backend.vm.compile(mod=mod, params=params, target="llvm")
vm = tvm.runtime.vm.VirtualMachine(exe, device=tvm.device("llvm"))
out = vm.run(**{**params, **inputs})

The result of each run with the same input is different.

My guess is this is just an overflow and your hardware handles it differently than mine; on my machine it outputs all 0s consistently probably due to handling this behavior.

If you up the dtype to a higher bit int you get non-zero output.