[Pkg-opencl-devel] OpenCL architectures

Rebecca N. Palmer rebecca_palmer at zoho.com
Tue Jul 5 18:23:12 UTC 2016


> How do you (members of this group) test OpenCL packages?

For beignet, I use BINDMOUNTS="/dev/dri" in pbuilderrc and this script 
as B10opencltests in the pbuilder hooks directory:
#!/bin/sh

#beignet's tests can't be run by the normal during-build mechanism
#because the pbuilder user can't access /dev/dri/card0
#("adduser pbuilder video" isn't enough)
if [ -e /tmp/buildd/beignet-?.* ]; then
     echo "Running opencl tests:" # if you're testing an application, 
you'll need an apt-get install $icd here
     cd /tmp/buildd/beignet-?.*
     chmod +x obj-*/utests/setenv.sh obj-*/utests/utest_run
     adduser testcl --disabled-password --gecos aaa # I prefer not to 
run tests as root
     chown testcl . # some of beignet's tests create files
     su testcl -c obj-*/utests/setenv.sh || true # actually run the tests
fi

but all this does is let you access the OpenCL device from inside the 
chroot - it won't help on a porterbox that doesn't have the hardware to 
begin with.

> Nonetheless, I am afraid the only solution is to develop a fake OpenCL
> implementation that would answer in a predictable manner for a limited
> but highly covering set of input.

https://packages.debian.org/sid/oclgrind might be what you're looking 
for: not quite every architecture, but a bigger selection than any of 
the normal ICDs.




More information about the Pkg-opencl-devel mailing list