[Piglit] [PATCH] arb_gpu_shader_int64: add test generation to standard testing template

Dave Airlie airlied at gmail.com
Mon Jul 4 06:20:27 UTC 2016


>
>
> All our automated piglit builds started to fail here:
>
> FAILED: cd
> /var/lib/hudson/jobs/piglit-ubuntu64/workspace/build/generated_tests &&
> /usr/bin/python3.4
> /var/lib/hudson/jobs/piglit-ubuntu64/workspace/generated_tests/gen_shader_precision_tests.py
>> shader_precision_tests.list
> Traceback (most recent call last):
>   File
> "/var/lib/hudson/jobs/piglit-ubuntu64/workspace/generated_tests/gen_shader_precision_tests.py",
> line 53, in <module>
>     from builtin_function import *
>   File
> "/var/lib/hudson/jobs/piglit-ubuntu64/workspace/generated_tests/builtin_function.py",
> line 983, in <module>
>     _make_componentwise_test_vectors(test_suite)
>   File
> "/var/lib/hudson/jobs/piglit-ubuntu64/workspace/generated_tests/builtin_function.py",
> line 960, in _make_componentwise_test_vectors
>     f('abs', 1, 150, np.abs, None, [np.linspace(-10, 15, 5,
> dtype=np.dtype(np.int64))],
> TypeError: linspace() got an unexpected keyword argument 'dtype'
>
>
> I tried with both Python 3 and Python 2, and they both fail identically.
>
> This is with Ubtuntu 16.04, which seems to have Numpy 1.8.2.
>
>
> `pydoc numpy.linspace` shows
>
>   numpy.linspace = linspace(start, stop, num=50, endpoint=True,
> retstep=False)
>
>
> Maybe one can replace the dtype arg with a cast after the linspace result.

Uggh this is definitely outside my comfort zone with python/numpy, it
took me long enough
to work out the dtype code I did use in the end.

Maybe we can just avoid building the int64 tests on a too old numpy
somehow, though
i think I read 1.9.0 is also where it was easy to detect the version at runtime.

I've sent a patch I think does the right thing using .astype instead
of setting dtype.

Dave.


More information about the Piglit mailing list