You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/09 11:59:54 UTC
[GitHub] [tvm] zhuwenxi commented on issue #7596: [BUG][CodeGenC]“tvm_call_packed” crashes when build with target “c”
zhuwenxi commented on issue #7596:
URL: https://github.com/apache/tvm/issues/7596#issuecomment-793783685
@leeexyz It works when I comment out the ICHECK line, but only for "tvm.build()". It still crashes when trying to run the module:

Below is my code to reproduce the crash:
<pre>
import tvm
from tvm import te
n = 1024
l = 128
m = 235
bias = te.var("bias", dtype="float32")`
A = te.placeholder((n, l), name="A")`
B = te.placeholder((l, m), name="B")`
C = te.extern(`
(n, m),
[A, B],
lambda ins, outs: tvm.tir.call_packed(`
"tvm.contrib.cblas.matmul", ins[0], ins[1], outs[0], False, False`
),`
name="C",`
)
D = te.compute(C.shape, lambda i, j: C[i, j] + bias, name="D")`
s = te.create_schedule(D.op)`
ctx = tvm.cpu(0)`
f = tvm.build(s, [A, B, D, bias], "c")
a = tvm.nd.array(np.random.uniform(size=(n, l)).astype(A.dtype), ctx)
b = tvm.nd.array(np.random.uniform(size=(l, m)).astype(B.dtype), ctx)
d = tvm.nd.array(np.zeros((n, m), dtype=D.dtype), ctx)
bb = 10.0
f(a, b, d, bb)
</pre>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org