-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
dnn(opencl): segfault when ChannelsPReLU fused with convolution (without bias) #17953
Copy link
Copy link
Closed
Milestone
Description
System information (version)
- OpenCV => 4.4.0 (probably in 3.4 too)
- Operating System / Platform => Ubuntu 18.04
- Compiler => gcc 7.5
Detailed description
Convolution without bias followed by ChannelsPReLU activation with fusion enabled leads to:
OpenCL program build log: dnn/conv_layer_spatial
Status -11: CL_BUILD_PROGRAM_FAILURE
-D TYPE=1 -D Dtype=float -D Dtype2=float2 -D Dtype4=float4 -D Dtype8=float8 -D Dtype16=float16 -D as_Dtype=as_float -D as_Dtype2=as_float2 -D as_Dtype4=as_float4 -D as_Dtype8=as_float8 -D KERNEL_WIDTH=3 -D KERNEL_HEIGHT=3 -D STRIDE_X=1 -D STRIDE_Y=1 -D DILATION_X=1 -D DILATION_Y=1 -D KERNEL_BASIC -cl-fast-relaxed-math -D ConvolveBasic=BASIC_k3x3_cn16_g1_s1x1_d1x1_b0_in16x16_p1x1_num2_M16_activ2_eltwise0_FP32_4_1_1_1 -cl-no-subgroup-ifp -D CHANNELS=16 -D APPLY_BIAS=0 -D OUTPUT_Z=16 -D ZPAR=1 -D FUSED_CONV_PRELU=1 -D INTEL_DEVICE
9:157:57: error: use of undeclared identifier 'biasIndex'
ACTIVATION_FUNCTION(convolved_image, offset, sum[kern], biasIndex + kern);
^
Failed to compile kernel: BASIC_k3x3_cn16_g1_s1x1_d1x1_b0_in16x16_p1x1_num2_M16_activ2_eltwise0_FP32_4_1_1_1, buildflags: -D TYPE=1 -D Dtype=float -D Dtype2=float2 -D Dtype4=float4 -D Dtype8=float8 -D Dtype16=float16 -D as_Dtype=as_float -D as_Dtype2=as_float2 -D as_Dtype4=as_float4 -D as_Dtype8=as_float8 -D KERNEL_WIDTH=3 -D KERNEL_HEIGHT=3 -D STRIDE_X=1 -D STRIDE_Y=1 -D DILATION_X=1 -D DILATION_Y=1 -D KERNEL_BASIC -cl-fast-relaxed-math -D ConvolveBasic=BASIC_k3x3_cn16_g1_s1x1_d1x1_b0_in16x16_p1x1_num2_M16_activ2_eltwise0_FP32_4_1_1_1 -cl-no-subgroup-ifp -D CHANNELS=16 -D APPLY_BIAS=0 -D OUTPUT_Z=16 -D ZPAR=1 -D FUSED_CONV_PRELU=1, errmsg: 9:157:57: error: use of undeclared identifier 'biasIndex'
ACTIVATION_FUNCTION(convolved_image, offset, sum[kern], biasIndex + kern);
^
Segmentation fault (core dumped)
Segfault also happens with convolution without bias + eltwise + ChannelsPReLU. It works without problems if convolution layer has bias.
Steps to reproduce
Disabled tests from #17976 can reproduce this bug. Relevant tests have // bug: https://github.com/opencv/opencv/issues/17953 comment just before applying the skip test tag.
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable