Hi, thanks for the finding! Could you reproduce the error using low-level TE interface?
x = te.placeholder([1, 1024, 16, 40], "float32", "x")
y = topi.nn.adaptive_pool(x, [12, 30], pool_type="avg")
f = te.create_prim_func([x, y])
print(f)
tvm.build(f, target="llvm")
If so, it maybe an issue alike Te.create_prim_func vs tvm.lower. A fix is send to the repo. Please refer to