I get the following error when executing simple code targeted at opencl. This 
is after I have installed a new opencl platform called pocl. Furthermore this 
error occurs even I if just use llvm target and cpu I cant figure out why ?.

![desktop|690x115](upload://yUOHYpfXs6jRXCgOLEVOcuBQKyr.png) 

This is the code that produced the error.

    import tvm 
    from tvm import te
    import numpy as np

    n = te.var("n") 
    A = te.placeholder((n,),name = 'A') 
    B = te.placeholder((n,),name = 'B') 
    C = te.compute(A.shape,lambda i: A[i] + B[i], name = 'C')

    s = te.create_schedule(C.op)

    bx, tx = s[C].split(C.op.axis[0], factor = 64)

    s[C].bind(bx, te.thread_axis("blockIdx.x")) 
    s[C].bind(tx, te.thread_axis("threadIdx.x"))

    fadd_cl = tvm.build(s, [A,B,C], target= 'opencl' , name = "myadd")

    ctx = tvm.opencl()

    n = 1024 
    a = tvm.nd.array(np.random.uniform(size=n).astype(A.dtype), ctx) 
    b = tvm.nd.array(np.random.uniform(size=n).astype(B.dtype), ctx) 
    c = tvm.nd.array(np.zeros(n, dtype=C.dtype), ctx) 
    fadd_cl(a,b,c) 
    np.testing.assert_allclose(c.asnumpy(), a.asnumpy() + b.asnumpy())





---
[Visit 
Topic](https://discuss.tvm.ai/t/error-when-executing-code-targeted-to-opencl/7781/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/5d846e0050b398b88a8347c3961d1d503c1dc68913b2a25ecd02f8b151e445ed).

Reply via email to