[PyOpenCL] invalid work group size
onoue at likr-lab.com
onoue at likr-lab.com
Sun Sep 25 05:22:04 PDT 2011
Hi,
I found a Apple OpenCL bug on Mac OS X Lion. If device type is CPU,
device.max_work_item_sizes[0] returns 1024. But, invalid work group
size error is occurred when local_size[0] is greater than 128. And, I
don't know why, ElementwiseKernel works only when local_size is None
or (1, 1, 1). I have already reported this error to Apple.
Incidentally, I got following error when I execute a script in Apple
OpenCL with PyOpenCL source code getting from git repository.
Traceback (most recent call last):
File "montecarlo.py", line 27, in <module>
kernel = create_kernel(context, D)
File "montecarlo.py", line 17, in create_kernel
arguments=arguments)
File "/Users/likr/git/pyopencl/pyopencl/reduction.py", line 268, in __init__
name=name+"_stage1", options=options, preamble=preamble)
File "/Users/likr/git/pyopencl/pyopencl/reduction.py", line 234, in
get_reduction_kernel
name, preamble, device, max_group_size)
File "/Users/likr/git/pyopencl/pyopencl/reduction.py", line 185, in
get_reduction_source
no_sync_size = min(get_dev_no_sync_size(dev) for dev in devices)
File "/Users/likr/git/pyopencl/pyopencl/reduction.py", line 185, in <genexpr>
no_sync_size = min(get_dev_no_sync_size(dev) for dev in devices)
File "/Users/likr/git/pyopencl/pyopencl/reduction.py", line 175, in
get_dev_no_sync_size
result = get_simd_group_size(device)
File "/Users/likr/git/pyopencl/pyopencl/characterize.py", line 271,
in get_simd_group_size
if dtype.itemsize == 1:
NameError: global name 'dtype' is not defined
Regards,
Yosuke
2011/8/27 Andreas Kloeckner <lists at informa.tiker.net>:
- 元のメッセージを隠す -
> On Fri, 26 Aug 2011 10:00:54 -0400, Randy Heiland <heiland at indiana.edu> wrote:
>> Just curious if this is the same problem:
>>
>> ~/Documents/workspace/pyopencl/examples$ export PYOPENCL_CTX='0'
>>
>> ~/Documents/workspace/pyopencl/examples$ python demo_elementwise_complex.py
>> Traceback (most recent call last):
>> File "demo_elementwise_complex.py", line 47, in <module>
>> complex_prod(5, a_gpu, b_gpu, c_gpu)
>> File "/Library/Python/2.7/site-packages/pyopencl-2011.1.2-py2.7-macosx-10.7-intel.egg/pyopencl/elementwise.py", line 161, in __call__
>> return cl.enqueue_nd_range_kernel(queue, self.kernel, gs, ls)
>> pyopencl.LogicError: clEnqueueNDRangeKernel failed: invalid work group size
>
> If '0' is the CPU, that's a bug in pyopencl, because
> pyopencl.elementwise should adapt to whatever the device allows. Right
> now, I don't have a way to test on Apple's CL implementation, so finding
> and fixing this stuff is hard. If someone were to give me SSH access to
> an Apple box for PyOpenCL testing, that'd make life much easier for
> me. Any takers? :)
>
> Thanks in advance,
> Andreas
>
- 元のメッセージを隠す -
> _______________________________________________
> PyOpenCL mailing list
> PyOpenCL at tiker.net
> http://lists.tiker.net/listinfo/pyopencl
>
>
More information about the PyOpenCL
mailing list