Skip to content

DNN: Make MatMul layer support 3D or 4D operation with const input#22775

Merged
opencv-pushbot merged 1 commit intoopencv:4.xfrom
WanliZhong:issue22713
Nov 21, 2022
Merged

DNN: Make MatMul layer support 3D or 4D operation with const input#22775
opencv-pushbot merged 1 commit intoopencv:4.xfrom
WanliZhong:issue22713

Conversation

@WanliZhong
Copy link
Copy Markdown
Member

@WanliZhong WanliZhong commented Nov 9, 2022

Merge with extra: opencv/opencv_extra#1015

This PR is a temporary solution to fix #22713.

When 3D or 4D MatMul with a const input, it will create a virtual layer to ensure it can be run correctly. Later I will create a new PR to optimize the parsing of MatMul so that 3D or 4D operations can also use SIMD and multi-thread acceleration like 2D MatMul.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Copy link
Copy Markdown
Member

@zihaomu zihaomu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@asmorkalov asmorkalov removed the request for review from rogday November 17, 2022 06:47
Copy link
Copy Markdown
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@opencv-pushbot opencv-pushbot merged commit a0a8d21 into opencv:4.x Nov 21, 2022
@alalek alalek mentioned this pull request Jan 8, 2023
@WanliZhong WanliZhong deleted the issue22713 branch May 16, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: dnn (onnx) ONNX suport issues in DNN module category: dnn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG ONNXImporter::handleNode MatMul

6 participants