Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV Blender causes CL_BUILD_PROGRAM_FAILURE

Just before today, the MultiBandBlender I used runs as expected.

Without changing the code, now every member function of the Blender class returns the OpenCL CL_BUILD_PROGRAM_FAILURE message.

Example code:

detail::MultiBandBlender _blender;
_blender.prepare(Rect(0, 0, _img1.size().width, _img1.size().height));
_blender.feed(_img1, _mask_1, Point(0, 0));
_blender.feed(_img2, _mask_2, Point(0, 0));
_blender.blend(_blended_img, blended_mask);

Terminal output:

OpenCL program build log: core/copyset
Status -11: CL_BUILD_PROGRAM_FAILURE
-D dstT=uchar4 -D rowsPerWI=1 -D dstST=uchar4 -D dstT1=uchar -D cn=4

OpenCL program build log: core/copymakeborder
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D BORDER_REFLECT -D T1=uchar -D cn=3 -D ST=uchar4 -D rowsPerWI=1

OpenCL program build log: imgproc/pyr_down
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D FT=float3 -D convertToT=convert_uchar3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=uchar -D cn=3 -D kercn=1 -D fdepth=5 -D BORDER_REFLECT_101 -D LOCAL_SIZE=256

OpenCL program build log: imgproc/pyr_up
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D FT=float3 -D convertToT=convert_uchar3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=uchar -D cn=3 -D LOCAL_SIZE=16

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D BINARY_OP -D OP_SUB -D srcT1=uchar -D srcT1_C1=uchar -D srcT2=uchar -D srcT2_C1=uchar -D dstT=short -D DEPTH_dst=3 -D dstT_C1=short -D workT=int -D workST=int -D scaleT=int -D wdepth=4 -D convertToWT1=convert_int -D convertToWT2=convert_int -D convertToDT=convert_short_sat -D DOUBLE_SUPPORT -D cn=1 -D rowsPerWI=1 -D convertFromU=noconvert

OpenCL program build log: core/convert
Status -11: CL_BUILD_PROGRAM_FAILURE
-D srcT=uchar -D WT=float -D dstT=short -D convertToWT=convert_float -D convertToDT=convert_short_sat_rte -D DOUBLE_SUPPORT -D NO_SCALE

OpenCL program build log: core/convert
Status -11: CL_BUILD_PROGRAM_FAILURE
-D srcT=uchar -D WT=float -D dstT=float -D convertToWT=convert_float -D convertToDT=noconvert -D DOUBLE_SUPPORT

OpenCL program build log: core/copymakeborder
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=int -D BORDER_CONSTANT -D T1=int -D cn=1 -D ST=int -D rowsPerWI=1

OpenCL program build log: imgproc/pyr_down
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=float -D FT=float -D convertToT=noconvert -D convertToFT=noconvert -D DOUBLE_SUPPORT -D T1=float -D cn=1 -D kercn=1 -D fdepth=5 -D BORDER_REFLECT_101 -D LOCAL_SIZE=256

OpenCL program build log: stitching/multibandblend
Status -11: CL_BUILD_PROGRAM_FAILURE
-D DEFINE_feed -D src_T=short3 -D src_T1=short -D src_CN=3 -D src_TSIZE=6 -D src_T1SIZE=2 -D src_DEPTH=3 -D weight_T=float -D weight_T1=float -D weight_CN=1 -D weight_TSIZE=4 -D weight_T1SIZE=4 -D weight_DEPTH=5 -D dst_T=short3 -D dst_T1=short -D dst_CN=3 -D dst_TSIZE=6 -D dst_T1SIZE=2 -D dst_DEPTH=3 -D dstWeight_T=float -D dstWeight_T1=float -D dstWeight_CN=1 -D dstWeight_TSIZE=4 -D dstWeight_T1SIZE=4 -D dstWeight_DEPTH=5

OpenCL program build log: stitching/multibandblend
Status -11: CL_BUILD_PROGRAM_FAILURE
-D DEFINE_normalizeUsingWeightMap -D mat_T=short3 -D mat_T1=short -D mat_CN=3 -D mat_TSIZE=6 -D mat_T1SIZE=2 -D mat_DEPTH=3 -D weight_T=float -D weight_T1=float -D weight_CN=1 -D weight_TSIZE=4 -D weight_T1SIZE=4 -D weight_DEPTH=5

OpenCL program build log: imgproc/pyr_up
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=short3 -D FT=float3 -D convertToT=convert_short3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=short -D cn=3 -D LOCAL_SIZE=16

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D BINARY_OP -D OP_ADD -D srcT1=short2 -D srcT1_C1=short -D srcT2=short2 -D srcT2_C1=short -D dstT=short2 -D DEPTH_dst=3 -D dstT_C1=short -D workT=int2 -D workST=int2 -D scaleT=int -D wdepth=4 -D convertToWT1=convert_int2 -D convertToWT2=convert_int2 -D convertToDT=convert_short2_sat -D DOUBLE_SUPPORT -D cn=2 -D rowsPerWI=1 -D convertFromU=noconvert

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D UNARY_OP -D srcT1=float -D dstT=uchar -D DEPTH_dst=0 -D workT=srcT1 -D cn=1 -D convertToDT=convert_uchar_sat_rte -D OP_CMP -D CMP_OPERATOR=> -D srcT1_C1=float -D srcT2_C1=float -D dstT_C1=uchar -D workST=float -D rowsPerWI=1 -D DOUBLE_SUPPORT

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D UNARY_OP -D srcT1=uchar -D dstT=uchar -D DEPTH_dst=0 -D workT=srcT1 -D cn=1 -D convertToDT=noconvert -D OP_CMP -D CMP_OPERATOR=== -D srcT1_C1=uchar -D srcT2_C1=uchar -D dstT_C1=uchar -D workST=uchar -D rowsPerWI=1 -D DOUBLE_SUPPORT

The strangest thing is that the blender still works. It's just that it now runs slower(25ms to 50ms) and it shows the CL_BUILD_PROGRAM_FAILURE messages.

I work on this remote Linux server, so maybe someone changed something. I rebuilt OpenCV(version 3.4.9 and 4.2.0), tried using GPU, and the OpenCL messages persist.

What is happening here?

click to hide/show revision 2
retagged

updated 2019-12-30 01:08:42 -0600

berak gravatar image

OpenCV Blender causes CL_BUILD_PROGRAM_FAILURE

Just before today, the MultiBandBlender I used runs as expected.

Without changing the code, now every member function of the Blender class returns the OpenCL CL_BUILD_PROGRAM_FAILURE message.

Example code:

detail::MultiBandBlender _blender;
_blender.prepare(Rect(0, 0, _img1.size().width, _img1.size().height));
_blender.feed(_img1, _mask_1, Point(0, 0));
_blender.feed(_img2, _mask_2, Point(0, 0));
_blender.blend(_blended_img, blended_mask);

Terminal output:

OpenCL program build log: core/copyset
Status -11: CL_BUILD_PROGRAM_FAILURE
-D dstT=uchar4 -D rowsPerWI=1 -D dstST=uchar4 -D dstT1=uchar -D cn=4

OpenCL program build log: core/copymakeborder
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D BORDER_REFLECT -D T1=uchar -D cn=3 -D ST=uchar4 -D rowsPerWI=1

OpenCL program build log: imgproc/pyr_down
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D FT=float3 -D convertToT=convert_uchar3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=uchar -D cn=3 -D kercn=1 -D fdepth=5 -D BORDER_REFLECT_101 -D LOCAL_SIZE=256

OpenCL program build log: imgproc/pyr_up
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=uchar3 -D FT=float3 -D convertToT=convert_uchar3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=uchar -D cn=3 -D LOCAL_SIZE=16

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D BINARY_OP -D OP_SUB -D srcT1=uchar -D srcT1_C1=uchar -D srcT2=uchar -D srcT2_C1=uchar -D dstT=short -D DEPTH_dst=3 -D dstT_C1=short -D workT=int -D workST=int -D scaleT=int -D wdepth=4 -D convertToWT1=convert_int -D convertToWT2=convert_int -D convertToDT=convert_short_sat -D DOUBLE_SUPPORT -D cn=1 -D rowsPerWI=1 -D convertFromU=noconvert

OpenCL program build log: core/convert
Status -11: CL_BUILD_PROGRAM_FAILURE
-D srcT=uchar -D WT=float -D dstT=short -D convertToWT=convert_float -D convertToDT=convert_short_sat_rte -D DOUBLE_SUPPORT -D NO_SCALE

OpenCL program build log: core/convert
Status -11: CL_BUILD_PROGRAM_FAILURE
-D srcT=uchar -D WT=float -D dstT=float -D convertToWT=convert_float -D convertToDT=noconvert -D DOUBLE_SUPPORT

OpenCL program build log: core/copymakeborder
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=int -D BORDER_CONSTANT -D T1=int -D cn=1 -D ST=int -D rowsPerWI=1

OpenCL program build log: imgproc/pyr_down
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=float -D FT=float -D convertToT=noconvert -D convertToFT=noconvert -D DOUBLE_SUPPORT -D T1=float -D cn=1 -D kercn=1 -D fdepth=5 -D BORDER_REFLECT_101 -D LOCAL_SIZE=256

OpenCL program build log: stitching/multibandblend
Status -11: CL_BUILD_PROGRAM_FAILURE
-D DEFINE_feed -D src_T=short3 -D src_T1=short -D src_CN=3 -D src_TSIZE=6 -D src_T1SIZE=2 -D src_DEPTH=3 -D weight_T=float -D weight_T1=float -D weight_CN=1 -D weight_TSIZE=4 -D weight_T1SIZE=4 -D weight_DEPTH=5 -D dst_T=short3 -D dst_T1=short -D dst_CN=3 -D dst_TSIZE=6 -D dst_T1SIZE=2 -D dst_DEPTH=3 -D dstWeight_T=float -D dstWeight_T1=float -D dstWeight_CN=1 -D dstWeight_TSIZE=4 -D dstWeight_T1SIZE=4 -D dstWeight_DEPTH=5

OpenCL program build log: stitching/multibandblend
Status -11: CL_BUILD_PROGRAM_FAILURE
-D DEFINE_normalizeUsingWeightMap -D mat_T=short3 -D mat_T1=short -D mat_CN=3 -D mat_TSIZE=6 -D mat_T1SIZE=2 -D mat_DEPTH=3 -D weight_T=float -D weight_T1=float -D weight_CN=1 -D weight_TSIZE=4 -D weight_T1SIZE=4 -D weight_DEPTH=5

OpenCL program build log: imgproc/pyr_up
Status -11: CL_BUILD_PROGRAM_FAILURE
-D T=short3 -D FT=float3 -D convertToT=convert_short3_sat_rte -D convertToFT=convert_float3 -D DOUBLE_SUPPORT -D T1=short -D cn=3 -D LOCAL_SIZE=16

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D BINARY_OP -D OP_ADD -D srcT1=short2 -D srcT1_C1=short -D srcT2=short2 -D srcT2_C1=short -D dstT=short2 -D DEPTH_dst=3 -D dstT_C1=short -D workT=int2 -D workST=int2 -D scaleT=int -D wdepth=4 -D convertToWT1=convert_int2 -D convertToWT2=convert_int2 -D convertToDT=convert_short2_sat -D DOUBLE_SUPPORT -D cn=2 -D rowsPerWI=1 -D convertFromU=noconvert

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D UNARY_OP -D srcT1=float -D dstT=uchar -D DEPTH_dst=0 -D workT=srcT1 -D cn=1 -D convertToDT=convert_uchar_sat_rte -D OP_CMP -D CMP_OPERATOR=> -D srcT1_C1=float -D srcT2_C1=float -D dstT_C1=uchar -D workST=float -D rowsPerWI=1 -D DOUBLE_SUPPORT

OpenCL program build log: core/arithm
Status -11: CL_BUILD_PROGRAM_FAILURE
-D UNARY_OP -D srcT1=uchar -D dstT=uchar -D DEPTH_dst=0 -D workT=srcT1 -D cn=1 -D convertToDT=noconvert -D OP_CMP -D CMP_OPERATOR=== -D srcT1_C1=uchar -D srcT2_C1=uchar -D dstT_C1=uchar -D workST=uchar -D rowsPerWI=1 -D DOUBLE_SUPPORT

The strangest thing is that the blender still works. It's just that it now runs slower(25ms to 50ms) and it shows the CL_BUILD_PROGRAM_FAILURE messages.

I work on this remote Linux server, so maybe someone changed something. I rebuilt OpenCV(version 3.4.9 and 4.2.0), tried using GPU, and the OpenCL messages persist.

What is happening here?