mirror of
https://github.com/opencv/opencv.git
synced 2024-12-15 01:39:10 +08:00
9d0c8a9edb
Einsum Layer Performance Test #24445 ## This PR adds performance tests for Einsum Layer. See below results of performance test on different inputs **Notation:** - WX: windows10_x64 - MX: macos_x64 - MA: macos_arm64 - UX: ubuntu_x64 - UA: ubuntu_arm64 All data in ms (milliseconds). Gemm is backend for matrix multiplication --- Benchmarks: | Equation | Inputs Mat Dims | UX (ms) | UA (ms) | MX (ms) | MA (ms) | WX (ms) | |-------------------------|-----------------------------------|----------------|---------|---------|---------|---------| | "ij, jk -> ik" | [2, 3], [3,2] | 0.04 ± 0.00 | - | - | - | - | | "ij, jk -> ik" | [20, 30], [30,20] | 0.08 ± 0.00 | - | - | - | - | | "ij, jk -> ik" | [113, 127], [127,113] | 2.41 ± 0.05 | - | - | - | - | | "imkj, injs -> imnks" | [1, 4, 7, 9], [1, 5, 9, 8] | 0.11 ± 0.00 | - | - | - | - | | "imkj, injs -> imnks" | [1, 4, 70, 90], [1, 5, 90, 80] | 15.49 ± 0.46 | - | - | - | - | | "imkj, injs -> imnks" | [1, 4, 73, 91], [1, 5, 91, 57] | 11.53 ± 0.06 | - | - | - | - | | "ij -> i" | [30, 40] | 0.03 ± 0.00 | - | - | - | - | | "ij -> i" | [113, 374] | 0.13 ± 0.00 | - | - | - | - | | "...ij -> ...i" | [30, 40] | 0.03 ± 0.00 | - | - | - | - | | "...ij -> ...i" | [113, 374] | 0.13 ± 0.00 | - | - | - | - | | "...ij, ...jk -> ...ik" | [40, 50], [50,80] | 0.37 ± 0.01 | - | - | - | - | | "...ij, ...jk -> ...ik" | [47, 51], [51, 83] | 0.43 ± 0.01 | - | - | - | - | ----- ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] 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 - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake |
||
---|---|---|
.. | ||
perf_caffe.cpp | ||
perf_common.cpp | ||
perf_convolution1d.cpp | ||
perf_convolution3d.cpp | ||
perf_convolution.cpp | ||
perf_einsum.cpp | ||
perf_gemm.cpp | ||
perf_layer.cpp | ||
perf_main.cpp | ||
perf_net.cpp | ||
perf_precomp.hpp | ||
perf_recurrent.cpp |