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

Jose Fonseca jfonseca at vmware.com
Sat Jul 2 12:50:12 UTC 2016


On 10/06/16 04:39, Dave Airlie wrote:
> +    f('abs', 1, 150, np.abs, None, [np.linspace(-10, 15, 5, dtype=np.dtype(np.int64))],
> +      extension="ARB_gpu_shader_int64")
> +    f('sign', 1, 150, np.sign, None, [np.linspace(-15, 15, 5, dtype=np.dtype(np.int64))],
> +      extension="ARB_gpu_shader_int64")

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.

Jose


More information about the Piglit mailing list