[Pkg-opencl-devel] OpenCL architectures
Brice Videau
brice.videau at imag.fr
Mon Jul 18 09:12:21 UTC 2016
On 05/07/2016 20:23, Rebecca N. Palmer wrote:
>> 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.
>
Indeed, for many aspects it would be enough. For object reference
validity we would still need indirect validation but I could do with it.
More information about the Pkg-opencl-devel
mailing list