Page 1 of 1
Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-26T01:19:45-07:00
by bensto
When I want to convert (resize) a *.png image under 64bit Win7 then sometimes (mostly but not always) the following error appears:
convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395.
Hmm, ImageMagick worked fine with the same command on the same computer in the past.
So this bug must be added in the last version(s).
Whats wrong?
Ben
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-26T02:51:36-07:00
by snibgo
What version of IM?
That is a warning, not an error. I expect IM still does whatever you asked it to. Does it?
I don't know what has changed. Perhaps IM didn't report when clBuildProgram failed, and now it does.
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-26T04:30:18-07:00
by magick
ImageMagick leverages your GPU, if available, to speed up certain image processing operations. If the GPU is not available, or if the OpenCL kernel fails to build or to run, ImageMagick reverts to the CPU algorithm to complete the operation. You should be getting expected results despite the GPU fail.
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-26T23:20:40-07:00
by bensto
yes, it looks like as if I am getting the desired result....but approx 20 times slower.
For resizing a photo tooks now ~10seconds (in comparison to 0.5 seconds before).
So what causes the fallback from GPU to CPU?
I did not change something extraordinary in my 64bit Win7 system in comparison to times when it runs in GPU mode.
It must be from inside the (newer) versions of ImageMagick.
Can I somehow tell IM (with cmdline parameter) to use GPU algorithms rather than CPU?
How?
Thank you
Ben
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-26T23:26:05-07:00
by fmw42
I am not an expert on this, but see
https://imagemagick.org/script/architecture.php
Note, that under Windows, you might have an issue with TDR (Timeout Detection and Recovery of GPUs). Its purpose is to detect runaway tasks hanging the GPU by using an execution time threshold. For some older low-end GPUs running the OpenCL filters in ImageMagick, longer execution times might trigger the TDR mechanism and pre-empt the GPU image filter. When this happens, ImageMagick automatically falls back to the CPU code path and returns the expected results. To avoid pre-emption, increase the TdrDelay registry key.
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-08-28T00:59:35-07:00
by bensto
On my 64bit Win7 system I found no TdrDelay registry entry.
Furthermore I wonder why this warning appears only recently.
In the past IM worked WITHOUT TdrDelay change.
What was changed in IM?
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-09-08T08:14:53-07:00
by magick
We just released ImageMagick version 7.0.8-64. Does the problem you reported persist with this release? If so, add -debug accelerate to your command line and post the log results here.
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-09-09T00:20:26-07:00
by bensto
with new version 64 IM crashes (on 64bit Win7) with popup message:
ImageMagick Studio library and utility program has stopped working
A problem caused the program to stop working correctly, Please close the program.
I downloaded and used "ImageMagick-7.0.8-64-portable-Q16-x64.zip"
When I add the "-debug" flag as suggested into the following command:
convert" "D:\work\Screenshot_20190906-180124.png" -resize x800 -debug -quality 97 "D:\work\Screenshot_20190906-180124.png"
I got the output:
convert: UnrecognizedEventType `-quality' @ error/convert.c/ConvertImageCommand/1254.
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-09-09T10:42:44-07:00
by dlemstra
You should add "-debug accelerate"
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
Posted: 2019-09-09T22:42:40-07:00
by bensto
Sorry.
convert" "D:\work\Screenshot_20190906-180124.png" -resize x800 -debug accelerate -quality 97 "D:\work\Screenshot_20190906-180124.png"
yields:
2019-09-10T05:38:26+00:00 0:00.029 0.031u 7.0.8 Accelerate convert[6044]: opencl.c/GetOpenCLCacheDirectory/375/Accelerate
Using cache directory: "C:\Users\Ben\AppData\Local\ImageMagick"
...before crash
cache directory: "C:\Users\Ben\AppData\Local\ImageMagick" exists