I'm failing to compile programs, using the write_imagef() functions on
Nvidia implementations.
Working with a 'Tesla K10.G2.8GB' using the driver version 367.35 on
python 2.7 with PyopenCL 2016.1,
I'm trying to compile the following program, which fails with a build
error:
Host Code
import pyopencl as cl
platform = cl.get_platforms()[0]
devs = platform.get_devices()
device1 = devs[1]
mf = cl.mem_flags
ctx = cl.Context([device1])
Queue1 = cl.CommandQueue(ctx)
f = open('Minimal.cl', 'r')
fstr = "".join(f.readlines())
prg = cl.Program(ctx, fstr).build()
Kernel (Minimal.cl)
__kernel void test(image2d_t d_output){
write_imagef(d_output,(int2)(1,1),(float4)(1.0f,1.0f,1.0f,1.0f));
}
The error I get is:
pyopencl.cffi_cl.RuntimeError: clbuildprogram failed:
BUILD_PROGRAM_FAILURE -
I checked, if my device has image support and that it supports reading
and writing to
texture buffers in the specified format. I think, that the same case
won't work for the 3d case,
because the extension 'cl_khr_3d_image_writes' is not supported on any
of our Nvidia device,
but I don't understand the problem for the 2D case.
_______________________________________________
PyOpenCL mailing list
PyOpenCL@tiker.net
https://lists.tiker.net/listinfo/pyopencl