Page 1 of 1

How to enforce using GPU

Posted: 2018-02-02T02:11:52-07:00
by rojkov
I tried to follow the example at https://www.imagemagick.org/script/arch ... istributed, but I don't see any load on my GPU which is Intel HD on Skylake processor.

I've built the latest beignet and compiled ImageMagick 7.0.7-22 from sources.

Code: Select all

$ identify -version
Version: ImageMagick 7.0.7-22 Q16 x86_64 2018-02-01 http://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenCL OpenMP 
Delegates (built-in): bzlib djvu fftw fontconfig freetype jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp x xml zlib
Then I tried

Code: Select all

$ MAGICK_OCL_DEVICE=ON convert -bench 10 Citrus-nature-mort-md.jpg -convolve "-1, -1, -1, -1, 9, -1, -1, -1, -1" convolve.jpg
and

Code: Select all

$ MAGICK_OCL_DEVICE=GPU convert -bench 10 Citrus-nature-mort-md.jpg -convolve "-1, -1, -1, -1, 9, -1, -1, -1, -1" convolve.jpg
but these commands load CPU, not GPU. And my $HOME/.cache/ImageMagick folder is empty.

I tried to put printfs into opencl.c and it seems the code path that checks MAGICK_OCL_DEVICE isn't even touched.

Did I miss something to offload CPU?