Basically with this version (2017.2) I am unable to create Kernels and access
them.
Simple Code:
import pyopencl as cl
platform = cl.get_platforms()[0]
devs = platform.get_devices()
device1 = devs[0]
ctx = cl.Context([device1])
Queue1 =
cl.CommandQueue(ctx,properties=cl.command_queue_properties.PROFILING_ENABLE)
fi = open('minimal_test.cl', 'r')
fstr = "".join(fi.readlines())
#prg = cl.Program(ctx, fstr).build()
prg = cl.Program(ctx, fstr).build()
knl = prg.init_z
The last line does not run and gives the following output:
Traceback (most recent call last):
File "/path/to/file/OpenCL_build_krnl_test.py", line 28, in <module>
knl = prg.init_z
File "/usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py", line 320,
in __getattr__
knl = Kernel(self, attr)
File "/usr/local/lib/python2.7/dist-packages/pyopencl/cffi_cl.py", line 1690,
in __init__
self._setup(program)
File "/usr/local/lib/python2.7/dist-packages/pyopencl/cffi_cl.py", line 1700,
in _setup
work_around_arg_count_bug=None)
File "/usr/local/lib/python2.7/dist-packages/pyopencl/invoker.py", line 394,
in generate_enqueue_and_set_args
result = _generate_enqueue_and_set_args_module(*cache_key)
File "/usr/local/lib/python2.7/dist-packages/pyopencl/invoker.py", line 359,
in _generate_enqueue_and_set_args_module
return gen.get_picklable_module(), enqueue_name
AttributeError: 'PythonCodeGenerator' object has no attribute
'get_picklable_module'
Am I missing something very basic?
Greets
Jonathan
_______________________________________________
PyOpenCL mailing list
[email protected]
https://lists.tiker.net/listinfo/pyopencl