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
Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
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.
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.
snibgo's IM pages: im.snibgo.com
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
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
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
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
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
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
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?
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
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
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.
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
You should add "-debug accelerate"
Re: Bug: convert: clBuildProgram failed. (-11) @ warning/opencl.c/CompileOpenCLKernel/1395
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
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