Skip to content

dnn(opencl): incompatible eltwise layers wrongly fused with convolution #17945

@YashasSamaga

Description

@YashasSamaga
System information (version)
  • OpenCV => 4.4.0, 3.4.11
  • Operating System / Platform => Ubuntu 18.04
  • Compiler => gcc 7.5.0
Detailed description

OpenCL backend is fusing unsupported eltwise configurations with convolution.

Steps to reproduce

Disabled tests from #17976 can reproduce this bug. Relevant tests have // bug: https://github.com/opencv/opencv/issues/17945 comment just before applying the skip test tag.

The tests that won't fail are those where the op is SUM without coefficients. OpenCL backend is fusing other incompatible eltwise configurations with convolution even though it is not supported.

I wasn't able to fuse eltwise for the CUDA backend because I had trouble getting eltwise configuration in fuseLayers. I tried to find what OpenCL backend was doing but I couldn't find any check. Turns out it simply isn't there and this is a bug.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions