How to enforce using GPU

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
rojkov
Posts: 1
Joined: 2018-02-02T01:52:56-07:00
Authentication code: 1152

How to enforce using GPU

Post 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?
Post Reply