Cannot find the Realization point of tensor Tensor(shape=[1000, 512], op.name=weight)

What does this error mean?

Check failed: allow_alloc == false: Cannot find the Realization point of tensor Tensor(shape=[1000, 512], op.name=weight) Error during compile function

#[version = “0.0.5”] fn (%p0: Tensor[(1, 512), float32], %p1: Tensor[(1000, 512), float32], %p2: Tensor[(1000), float32], Primitive=1) → Tensor[(1, 1000), float32] { %0 = nn.dense(%p0, %p1, units=1000) /* ty=Tensor[(1, 1000), float32] /; add(%0, %p2) / ty=Tensor[(1, 1000), float32] */ }

2 Likes

I got the same error. In my case I got a long compute that involves several te.compute in it. The compute is defined for a new relay op and has an AutoTVM schedule as well. I suspect some of them should’ve been ProducerRealizeNodes yet they’re not, according to src/te/schedule/schedule_postproc_to_primfunc.cc. However I have no idea how to debug this.

Btw this issue seems to be related although it’s for hybrid script.

Anyone could help?

It is likely because of some operators were not correctly scheduled. It would be great if you can create a minimal reproducible script. You can use Relay Python API to creates a minimal model (like this example) that would help debugging

Thanks for the reply. I get over this bug for now and it seems to be caused by having dangling input tensors, e.g. not following conventions like this to pack input tensors when necessary.