You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Wu Zheng via Apache TVM Discuss <no...@discuss.tvm.ai> on 2021/03/30 13:21:27 UTC
[Apache TVM Discuss] [Questions] Buffer bind scope mismatch
I am wandering what does this error mean?
`Check failed: arg->scope == value->scope: Argument local.in_buffer Buffer bind scope mismatch`
Here I code a matrix multiplication and I want to intrisic to tensorize, as the code follows:
data = tvm.te.placeholder((64, 64), dtype="int8", name="data")
kernel = tvm.te.placeholder((64, 64), dtype="int8", name="kernel")
out_type = "int16"
oshape = (64, 64)
# define the conv2d operator over the padded data
k = te.reduce_axis((0, 64), name="k_w")
hstride, wstride = 1, 1
res = te.compute(
oshape,
lambda bo, co: te.sum(
data[bo, k].astype(out_type) * kernel[k, co].astype(out_type),
axis=k,
),
name="res",
)
s = tvm.te.create_schedule(res.op)
env = get_env()
x, y= s[res].op.axis
s[res].tensorize(x, gemm(env, 0, 4, 4, 4))
s[res].pragma(x, "import_llvm", intrin_impl())
code = tvm.lower(s, [data, kernel, res], simple_mode=True)
print(code)
While the in intrisic, I declared the buffer, as the code follows:
inp_layout = tvm.tir.decl_buffer(
inp.shape,
inp.dtype,
env.in_scope,
scope=env.in_scope,
offset_factor=in_lanes,
data_alignment=in_lanes,
)
I am wandering what does the error mean? what is arg? what is value?
If anyone have any idea, please share with me. I will be very happy to accept any advice. And if you have any question about my code, please let me know.
---
[Visit Topic](https://discuss.tvm.apache.org/t/buffer-bind-scope-mismatch/9570/1) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/f1f17f5685f143a05ec409acdb6358d7cd32c5ea1ffb8d13c1be1c8c507b8ac0).
[Apache TVM Discuss] [Questions] Buffer bind scope mismatch
Posted by Wu Zheng via Apache TVM Discuss <no...@discuss.tvm.ai>.
sorry, i may forget how i solve the problem
---
[Visit Topic](https://discuss.tvm.apache.org/t/buffer-bind-scope-mismatch/9570/3) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/fe160ac592c497b94dc826ccc79071aab07b70631fca4ffb815dc3207c4ef1c8).
[Apache TVM Discuss] [Questions] Buffer bind scope mismatch
Posted by XuZhi via Apache TVM Discuss <no...@discuss.tvm.ai>.
Have you figured out this question? I have just met the same problem.
---
[Visit Topic](https://discuss.tvm.apache.org/t/buffer-bind-scope-mismatch/9570/2) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/d9b42dc2990e560cfc8fe762a25d27664fd817d66c9dc4b808244a95f0d3485f).