nareshmlx/opencv-pr huggingface dataset:
**File:** doc/pattern_tools/gen_pattern.py
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -6,24 +6,28 @@
 -o, --output - output file (default out.svg)
 -r, --rows - pattern rows (default 11)
 -c, --columns - pattern columns (default 8)
--T, --type - type of pattern, circles, acircles, checkerboard, radon_checkerboard (default circles)
+-T, --type - type of pattern: circles, acircles, checkerboard, radon_checkerboard, charuco_board. default circles.
 -s, --square_size - size of squares in pattern (default 20.0)
 -R, --radius_rate - circles_radius = square_size/radius_rate (default 5.0)
 -u, --units - mm, inches, px, m (default mm)
 -w, --page_width - page width in units (default 216)
```

Review comment:
units in 12 line
**File:** doc/pattern_tools/gen_pattern.py
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -6,24 +6,28 @@
 -o, --output - output file (default out.svg)
 -r, --rows - pattern rows (default 11)
 -c, --columns - pattern columns (default 8)
--T, --type - type of pattern, circles, acircles, checkerboard, radon_checkerboard (default circles)
+-T, --type - type of pattern: circles, acircles, checkerboard, radon_checkerboard, charuco_board. default circles.
 -s, --square_size - size of squares in pattern (default 20.0)
 -R, --radius_rate - circles_radius = square_size/radius_rate (default 5.0)
 -u, --units - mm, inches, px, m (default mm)
 -w, --page_width - page width in units (default 216)
```

Review comment:
-u flag for units for all pattern parameters. line 12
**File:** doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -17,6 +17,9 @@ You can find a chessboard pattern in https://github.com/opencv/opencv/blob/4.x/d
 
 You can find a circleboard pattern in https://github.com/opencv/opencv/blob/4.x/doc/acircles_pattern.png
 
+You can find a ChAruco board pattern in https://github.com/opencv/opencv/blob/4.x/doc/charuco_board_pattern.png
+(7X5 ChAruco board, square size: 30 mm , marker size: 15 mm, aruco dict: DICT_5X5_100, page width: 210 mm, page height: 297 mm)
+
 Create your own pattern
 ---------------
 
```

Review comment:
.gz is missing.
**File:** doc/pattern_tools/gen_pattern.py
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -6,24 +6,28 @@
 -o, --output - output file (default out.svg)
 -r, --rows - pattern rows (default 11)
 -c, --columns - pattern columns (default 8)
--T, --type - type of pattern, circles, acircles, checkerboard, radon_checkerboard (default circles)
+-T, --type - type of pattern: circles, acircles, checkerboard, radon_checkerboard, charuco_board. default circles.
 -s, --square_size - size of squares in pattern (default 20.0)
 -R, --radius_rate - circles_radius = square_size/radius_rate (default 5.0)
 -u, --units - mm, inches, px, m (default mm)
 -w, --page_width - page width in units (default 216)
```

Review comment:
"Error: Aruco marker can not be larger than square size" or "Error: Aruco marker cannot be lager than chessboard square"
**File:** doc/pattern_tools/gen_pattern.py
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -6,24 +6,28 @@
 -o, --output - output file (default out.svg)
 -r, --rows - pattern rows (default 11)
 -c, --columns - pattern columns (default 8)
--T, --type - type of pattern, circles, acircles, checkerboard, radon_checkerboard (default circles)
+-T, --type - type of pattern: circles, acircles, checkerboard, radon_checkerboard, charuco_board. default circles.
 -s, --square_size - size of squares in pattern (default 20.0)
 -R, --radius_rate - circles_radius = square_size/radius_rate (default 5.0)
 -u, --units - mm, inches, px, m (default mm)
 -w, --page_width - page width in units (default 216)
```

Review comment:
than required for chosen board
**File:** doc/tutorials/calib3d/camera_calibration_pattern/camera_calibration_pattern.markdown
**Change Type:** modified
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -17,6 +17,9 @@ You can find a chessboard pattern in https://github.com/opencv/opencv/blob/4.x/d
 
 You can find a circleboard pattern in https://github.com/opencv/opencv/blob/4.x/doc/acircles_pattern.png
 
+You can find a ChAruco board pattern in https://github.com/opencv/opencv/blob/4.x/doc/charuco_board_pattern.png
+(7X5 ChAruco board, square size: 30 mm , marker size: 15 mm, aruco dict: DICT_5X5_100, page width: 210 mm, page height: 297 mm)
+
 Create your own pattern
 ---------------
 
```

Review comment:
Still relevant.
**File:** samples/cpp/aruco_dict_utils.cpp
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,348 @@
+#include <opencv2/objdetect/aruco_detector.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+static int _getSelfDistance(const Mat &marker) {
+
+    Mat bytes = aruco::Dictionary::getByteListFromBits(marker);
```

Review comment:
> inline Functions bodies are large.
**File:** samples/cpp/aruco_dict_utils.cpp
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,348 @@
+#include <opencv2/objdetect/aruco_detector.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+static int _getSelfDistance(const Mat &marker) {
+
+    Mat bytes = aruco::Dictionary::getByteListFromBits(marker);
```

Review comment:
`hal` in samples is overkill. Don't use low-level APIs in **generic samples**. (at least because you can't wrote similar example in other languages, like Python / Java / etc)
**File:** doc/pattern_tools/test_charuco_board.py
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,118 @@
+from __future__ import print_function
+
+import os, tempfile, numpy as np
+
+import sys
+import cv2 as cv
+from tests_common import NewOpenCVTests
+import gen_pattern
+
```

Review comment:
`markerImage` is not used in code. I propose to get rid of if.
**File:** doc/pattern_tools/test_charuco_board.py
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,118 @@
+from __future__ import print_function
+
+import os, tempfile, numpy as np
+
+import sys
+import cv2 as cv
+from tests_common import NewOpenCVTests
+import gen_pattern
+
```

Review comment:
The files in tmp are not removed by test. It will produce a lot of garbage on CI. Please take a look on test for aruco: https://github.com/opencv/opencv/blob/a8d3d1f6f9aa6a91c5fe4a133d541cab73036c01/modules/objdetect/misc/python/test/test_objdetect_aruco.py#L189. It removes temporary files every time.
**File:** samples/cpp/aruco_dict_utils.cpp
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,348 @@
+#include <opencv2/objdetect/aruco_detector.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+static int _getSelfDistance(const Mat &marker) {
+
+    Mat bytes = aruco::Dictionary::getByteListFromBits(marker);
```

Review comment:
`readDictionary` is not a static method, it is not necessary to call the namespace.
**File:** samples/cpp/aruco_dict_utils.cpp
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,348 @@
+#include <opencv2/objdetect/aruco_detector.hpp>
+#include <iostream>
+
+using namespace cv;
+using namespace std;
+
+static int _getSelfDistance(const Mat &marker) {
+
+    Mat bytes = aruco::Dictionary::getByteListFromBits(marker);
```

Review comment:
just: ` bool readOk = dictionary.readDictionary(fs.root()); `
**File:** doc/pattern_tools/test_charuco_board.py
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,118 @@
+from __future__ import print_function
+
+import os, tempfile, numpy as np
+
+import sys
+import cv2 as cv
+from tests_common import NewOpenCVTests
+import gen_pattern
+
```

Review comment:
It removes files for the last loop iteration, but not all temporary files.
**File:** doc/pattern_tools/test_charuco_board.py
**Change Type:** added
**Context:** PR #23363: added charuco board generation to gen_pattern.py

**Code Changes:**
```diff
@@ -0,0 +1,118 @@
+from __future__ import print_function
+
+import os, tempfile, numpy as np
+
+import sys
+import cv2 as cv
+from tests_common import NewOpenCVTests
+import gen_pattern
+
```

Review comment:
The same with temporary files here.
**File:** modules/dnn/src/layers/recurrent_layers.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -113,12 +113,19 @@ class LSTMLayerImpl CV_FINAL : public LSTMLayer
     MatShape outTailShape;  //shape of single output sample
     MatShape outTsShape;    //shape of N output samples
 
+    enum layout_t : int {
+        SEQ_BATCH_HID = 0,
+        BATCH_SEQ_HID = 1
+    };
+
     bool useTimestampDim;
```

Review comment:
I suggest to create a enum. `layout` in ONNX has `int` type.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -1753,8 +1753,16 @@ void ONNXImporter::parseLSTM(LayerParams& layerParams, const opencv_onnx::NodePr
     CV_Assert(shapeIt != outShapes.end());
     const MatShape x_shape = shapeIt->second;
 
-    const int seq_length = x_shape[0];
-    const int batch_size = x_shape[1];
+    //if layout is 1, change batch and sequence dims
+    const int layout = layerParams.get<int>("layout", 0);
+    int batch_size, seq_length;
+    if (layout == 1){
```

Review comment:
default value should be 0. See https://github.com/onnx/onnx/blob/906884ab594d5631cb4d31cf0d5aaeb78ed04f80/docs/Operators.md?plain=1#L19104
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -1393,6 +1393,20 @@ TEST_P(Test_ONNX_layers, LSTM_init_h0_c0)
         applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA);
     testONNXModels("lstm_init_h0_c0", npy, 0, 0, false, false, 3);
 }
+// epsilon is larger because onnx does not match with torch/opencv exactly
+TEST_P(Test_ONNX_layers, LSTM_layout_seq)
+{
+    if(backend == DNN_BACKEND_CUDA)
+        applyTestTag(CV_TEST_TAG_DNN_SKIP_CUDA);
+    testONNXModels("lstm_layout_0", npy, 0.005, 0.005, false, false, 3);
```

Review comment:
Please reflect behavior in the test name. `LSTM_layout_0` -> `LSTM_layout_seq`, `LSTM_layout_1` -> `LSTM_layout_batch`
**File:** modules/dnn/src/layers/recurrent_layers.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -113,12 +113,19 @@ class LSTMLayerImpl CV_FINAL : public LSTMLayer
     MatShape outTailShape;  //shape of single output sample
     MatShape outTsShape;    //shape of N output samples
 
+    enum layout_t : int {
+        SEQ_BATCH_HID = 0,
+        BATCH_SEQ_HID = 1
+    };
+
     bool useTimestampDim;
```

Review comment:
Add whitespaces please: ``` if () { } else { } ```
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -1753,8 +1753,16 @@ void ONNXImporter::parseLSTM(LayerParams& layerParams, const opencv_onnx::NodePr
     CV_Assert(shapeIt != outShapes.end());
     const MatShape x_shape = shapeIt->second;
 
-    const int seq_length = x_shape[0];
-    const int batch_size = x_shape[1];
+    //if layout is 1, change batch and sequence dims
+    const int layout = layerParams.get<int>("layout", 0);
+    int batch_size, seq_length;
+    if (layout == 1){
```

Review comment:
Done! But why?
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -1753,8 +1753,16 @@ void ONNXImporter::parseLSTM(LayerParams& layerParams, const opencv_onnx::NodePr
     CV_Assert(shapeIt != outShapes.end());
     const MatShape x_shape = shapeIt->second;
 
-    const int seq_length = x_shape[0];
-    const int batch_size = x_shape[1];
+    //if layout is 1, change batch and sequence dims
+    const int layout = layerParams.get<int>("layout", 0);
+    int batch_size, seq_length;
+    if (layout == 1){
```

Review comment:
Just simpler for the future tracking of changed lines.
**File:** modules/dnn/src/layers/recurrent_layers.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -113,12 +113,19 @@ class LSTMLayerImpl CV_FINAL : public LSTMLayer
     MatShape outTailShape;  //shape of single output sample
     MatShape outTsShape;    //shape of N output samples
 
+    enum layout_t : int {
+        SEQ_BATCH_HID = 0,
+        BATCH_SEQ_HID = 1
+    };
+
     bool useTimestampDim;
```

Review comment:
We can compare with enum values now
**File:** modules/dnn/src/layers/recurrent_layers.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -113,12 +113,19 @@ class LSTMLayerImpl CV_FINAL : public LSTMLayer
     MatShape outTailShape;  //shape of single output sample
     MatShape outTsShape;    //shape of N output samples
 
+    enum layout_t : int {
+        SEQ_BATCH_HID = 0,
+        BATCH_SEQ_HID = 1
+    };
+
     bool useTimestampDim;
```

Review comment:
Please change comment correspondingly to the latest changes
**File:** modules/dnn/src/layers/recurrent_layers.cpp
**Change Type:** modified
**Context:** PR #23614: LSTM ONNX Layout Attribute Support

**Code Changes:**
```diff
@@ -113,12 +113,19 @@ class LSTMLayerImpl CV_FINAL : public LSTMLayer
     MatShape outTailShape;  //shape of single output sample
     MatShape outTsShape;    //shape of N output samples
 
+    enum layout_t : int {
+        SEQ_BATCH_HID = 0,
+        BATCH_SEQ_HID = 1
+    };
+
     bool useTimestampDim;
```

Review comment:
`if (layout == BATCH_SEQ_HID)`
**File:** modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp
**Change Type:** modified
**Context:** PR #22275: DNN: FP16 support on Convolution 2D

**Code Changes:**
```diff
@@ -8,7 +8,7 @@ namespace cv {
 namespace dnn {
 CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
 
-void convBlock(int np, const float* a, const float* b, float* c, int ldc, bool init_c, const int convMR, const int convNR);
+void convBlock(int np, const float* a, const float* b, float* c, int ldc, bool init_c, int width, const int convMR, const int convNR);
 
 #if !defined(CV_CPU_OPTIMIZATION_DECLARATIONS_ONLY) && CV_AVX
 
@@ -17,7 +17,7 @@ void convBlock(int np, const float* a, const float* b, float* c, int ldc, bool i
```

Review comment:
Redefinition. The first definition is at line 491
**File:** modules/videoio/src/cap_ffmpeg_impl.hpp
**Change Type:** modified
**Context:** PR #23606: videoio/FFmpeg: increased packet read attempt limit, allow configuring it - resolves #9455 related #3225 * Use different counters for wrong...

**Code Changes:**
```diff
@@ -40,6 +40,7 @@
 //
 //M*/
 
+#include <opencv2/core/utils/configuration.private.hpp>
 #include "cap_ffmpeg_legacy_api.hpp"
 #include "opencv2/core/utils/logger.hpp"
 #include "cap_interface.hpp"
@@ -1428,8 +1429,10 @@ bool CvCapture_FFMPEG::grabFrame()
 {
```

Review comment:
`OPENCV_FFMPEG_READ_STREAM_ATTEMPTS`
**File:** modules/videoio/src/cap_ffmpeg_impl.hpp
**Change Type:** modified
**Context:** PR #23606: videoio/FFmpeg: increased packet read attempt limit, allow configuring it - resolves #9455 related #3225 * Use different counters for wrong...

**Code Changes:**
```diff
@@ -40,6 +40,7 @@
 //
 //M*/
 
+#include <opencv2/core/utils/configuration.private.hpp>
 #include "cap_ffmpeg_legacy_api.hpp"
 #include "opencv2/core/utils/logger.hpp"
 #include "cap_interface.hpp"
@@ -1428,8 +1429,10 @@ bool CvCapture_FFMPEG::grabFrame()
 {
```

Review comment:
Since it is `av_read_frame` maybe `READ_FRAME_ATTEMPTS` would fit better? Or just `READ_ATTEMPTS` for short?
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23557: fix nary elementwise bug in cpu

**Code Changes:**
```diff
@@ -1937,6 +1937,117 @@ INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_Eltwise_unequal, Combine(
     dnnBackendsAndTargets()
 ));
 
+
+struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tuple<Backend, Target>>>
+{
+public:
+    void test_bcast()
+    {
```

Review comment:
The best way to disable test in GTest is addtion of `DISABLED_` to it's name. It's listed with disabled status in reports, but could be forced with command line parameters.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23557: fix nary elementwise bug in cpu

**Code Changes:**
```diff
@@ -1937,6 +1937,117 @@ INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_Eltwise_unequal, Combine(
     dnnBackendsAndTargets()
 ));
 
+
+struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tuple<Backend, Target>>>
+{
+public:
+    void test_bcast()
+    {
```

Review comment:
It makes sense to replace the loop with GTest parameters instantiation. All cases are printed in console and report. Also, it's obvious which one is broken in case of failure.
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23557: fix nary elementwise bug in cpu

**Code Changes:**
```diff
@@ -1937,6 +1937,117 @@ INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_Eltwise_unequal, Combine(
     dnnBackendsAndTargets()
 ));
 
+
+struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tuple<Backend, Target>>>
+{
+public:
+    void test_bcast()
+    {
```

Review comment:
Can we use `ASSERT_*` instead right here?
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23557: fix nary elementwise bug in cpu

**Code Changes:**
```diff
@@ -1937,6 +1937,117 @@ INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_Eltwise_unequal, Combine(
     dnnBackendsAndTargets()
 ));
 
+
+struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tuple<Backend, Target>>>
+{
+public:
+    void test_bcast()
+    {
```

Review comment:
I have changed them to `ASSERT_*`
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23557: fix nary elementwise bug in cpu
**Review Line:** 2034

**Code Changes:**
```diff
+};
+
+TEST_P(Layer_Test_Eltwise_bcast, DISABLED_brute_force)
+{
+    test_bcast();
+}
+
+// This test is to verify whether the broadcast operations of unidirectional and bidirectional,
+// as well as tensors with same and different shapes, can be forwarded correctly.
+// This can ensure that the elementwise layer does not have any errors when forwarding.
+//
```

Review comment:
To avoid duplicates, ```cpp struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<int, tuple<Backend, Target> > > INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_Eltwise_bcast, Combine( Values(1, 2, 3, 4, 5), dnnBackendsAndTargets() )); ```
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23560: DNN/CUDA: Solve the bug of same shape broadcast with CUDA
**Review Line:** 1953

**Code Changes:**
```diff
@@ -1949,6 +1949,9 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
         int backend = get<0>(backend_target);
         int target = get<1>(backend_target);
 
+        if (backend == DNN_BACKEND_CUDA && dim > 4)
+            applyTestTag(CV_TEST_TAG_LONG);
+
         vector<vector<int>> dim_shape_list;
         get_all_arr(dim_shape_list, dim);
         replace(dim_shape_list, 1, 3);
@@ -2028,7 +2031,7 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
```

Review comment:
BTW, Looks like no tests are skipped on CI. `CV_TEST_TAG_VERYLONG` tests are skipped by default. `CV_TEST_TAG_LONG` tests should be skipped on embedded platforms or coverage/valgrind build configurations (though extra parameter on CI).
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23560: DNN/CUDA: Solve the bug of same shape broadcast with CUDA
**Review Line:** 1953

**Code Changes:**
```diff
@@ -1949,6 +1949,9 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
         int backend = get<0>(backend_target);
         int target = get<1>(backend_target);
 
+        if (backend == DNN_BACKEND_CUDA && dim > 4)
+            applyTestTag(CV_TEST_TAG_LONG);
+
         vector<vector<int>> dim_shape_list;
         get_all_arr(dim_shape_list, dim);
         replace(dim_shape_list, 1, 3);
@@ -2028,7 +2031,7 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
```

Review comment:
Longer than 5s but less than 20s, so it should use LONG tag ![image](https://github.com/opencv/opencv/assets/49567307/b44a360a-0c5e-4b36-8e01-f0dd7fd8b835)
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #23560: DNN/CUDA: Solve the bug of same shape broadcast with CUDA
**Review Line:** 1953

**Code Changes:**
```diff
@@ -1949,6 +1949,9 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
         int backend = get<0>(backend_target);
         int target = get<1>(backend_target);
 
+        if (backend == DNN_BACKEND_CUDA && dim > 4)
+            applyTestTag(CV_TEST_TAG_LONG);
+
         vector<vector<int>> dim_shape_list;
         get_all_arr(dim_shape_list, dim);
         replace(dim_shape_list, 1, 3);
@@ -2028,7 +2031,7 @@ struct Layer_Test_Eltwise_bcast : testing::TestWithParam<tuple<string, int, tupl
```

Review comment:
Ok, lets run all CUDA tests.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
> is_matmul Do we really need this? Where is it used? Does `InnerProduct` without `is_matmul` make sense (used somewhere)? Such layer parameters should be described in headers' documentation, because this behavior is not obvious.
**File:** modules/dnn/src/onnx/onnx_importer.cpp
**Change Type:** modified
**Context:** PR #23061: DNN: make GEMM can be supported with transA and transB in CUDA
**Review Line:** 2059

**Code Changes:**
```diff
@@ -2056,6 +2056,7 @@ void ONNXImporter::parseGemm(LayerParams& layerParams, const opencv_onnx::NodePr
     }
 
     layerParams.set("bias_term", node_proto.input_size() == 3);
+    layerParams.set("is_matmul", true);
     addLayer(layerParams, node_proto);
 }
 
```

Review comment:
In the current implementation, `InnerProduct` and `MatMul` are implemented using the same code. Previously, it used to distinguish the two by judging whether `InputB` is const or not, which could not distinguish the two in some cases, so the `is_matmul` parameter was introduced. I add this parameter in https://github.com/opencv/opencv/pull/22828. If it is acceptable, I will add some description in header's documentation.