[Pkg-opencl-devel] Bug#1024046: pyopencl FTBFS with Python 3.11 as supported version
Adrian Bunk
bunk at debian.org
Mon Nov 14 00:53:02 GMT 2022
Source: pyopencl
Version: 2022.1.6-2
Severity: serious
Tags: ftbfs
https://buildd.debian.org/status/fetch.php?pkg=pyopencl&arch=amd64&ver=2022.1.6-2%2Bb1&stamp=1668366441&raw=0
...
=================================== FAILURES ===================================
_ test_elwise_kernel[<context factory for <pyopencl.Device 'pthread-Intel Core Processor (Haswell, no TSX)' on 'Portable Computing Language'>>] _
ctx_factory = <pyopencl.tools._ContextFactory object at 0x7ff216396850>
def test_elwise_kernel(ctx_factory):
context = ctx_factory()
queue = cl.CommandQueue(context)
from pyopencl.clrandom import rand as clrand
> a_gpu = clrand(queue, (50,), np.float32)
test_algorithm.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../pyopencl/clrandom.py:767: in rand
gen.fill_uniform(result, a=a, b=b)
../pyopencl/clrandom.py:681: in fill_uniform
return self._fill("uniform", ary,
../pyopencl/clrandom.py:658: in _fill
self.get_gen_kernel(ary.dtype, distribution)
/usr/lib/python3/dist-packages/pytools/__init__.py:696: in wrapper
result = function(obj, *args, **kwargs)
../pyopencl/clrandom.py:641: in get_gen_kernel
knl.set_scalar_arg_dtypes(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pyopencl._cl.Kernel object at 0x7ff216810ef0>
arg_types = (<class 'numpy.int32'>, <class 'numpy.int32'>, <class 'numpy.int32'>, <class 'numpy.int32'>, <class 'numpy.int32'>, None, ...)
def kernel_set_arg_types(self, arg_types):
arg_types = tuple(arg_types)
# {{{ arg counting bug handling
# For example:
# https://github.com/pocl/pocl/issues/197
# (but Apple CPU has a similar bug)
work_around_arg_count_bug = False
warn_about_arg_count_bug = False
from pyopencl.characterize import has_struct_arg_count_bug
count_bug_per_dev = [
has_struct_arg_count_bug(dev, self.context)
for dev in self.context.devices]
from pytools import single_valued
if any(count_bug_per_dev):
if all(count_bug_per_dev):
work_around_arg_count_bug = single_valued(count_bug_per_dev)
else:
warn_about_arg_count_bug = True
# }}}
from pyopencl.invoker import generate_enqueue_and_set_args
enqueue, my_set_args = \
generate_enqueue_and_set_args(
self.function_name,
len(arg_types), self.num_args,
arg_types,
warn_about_arg_count_bug=warn_about_arg_count_bug,
work_around_arg_count_bug=work_around_arg_count_bug,
devs=self.context.devices)
# Make ourselves a kernel-specific class, so that we're able to override
# __call__. Inspired by https://stackoverflow.com/a/38541437
class KernelWithCustomEnqueue(type(self)):
__call__ = enqueue
set_args = my_set_args
> self.__class__ = KernelWithCustomEnqueue
E TypeError: __class__ assignment: 'KernelWithCustomEnqueue' object layout differs from 'pyopencl._cl.Kernel'
../pyopencl/__init__.py:878: TypeError
_ test_elwise_kernel_with_options[<context factory for <pyopencl.Device 'pthread-Intel Core Processor (Haswell, no TSX)' on 'Portable Computing Language'>>] _
ctx_factory = <pyopencl.tools._ContextFactory object at 0x7ff216556750>
def test_elwise_kernel_with_options(ctx_factory):
from pyopencl.clrandom import rand as clrand
from pyopencl.elementwise import ElementwiseKernel
context = ctx_factory()
queue = cl.CommandQueue(context)
> in_gpu = clrand(queue, (50,), np.float32)
...
= 203 failed, 57 passed, 6 skipped, 1 deselected, 2 xfailed, 19 warnings in 115.65s (0:01:55) =
E: pybuild pybuild:379: test: plugin custom failed with: exit code=1: PYTHONPATH=/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build cp -r /<<PKGBUILDDIR>>/test /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build && cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/test && python3.11 -m pytest --verbosity=2 -k 'not test_event_set_callback' && rm -rf /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/test
...
More information about the Pkg-opencl-devel
mailing list