nareshmlx/opencv-pr huggingface dataset:
**File:** modules/core/src/matrix.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1110

**Code Changes:**
```diff
     return p;
 }
 
+MatShape Mat::shape() const
+{
+    return dims == 0 && data == 0 ? MatShape() : MatShape(dims, size.p);
+}
 
 Mat::Mat(Mat&& m) CV_NOEXCEPT
     : flags(m.flags), dims(m.dims), rows(m.rows), cols(m.cols), data(m.data),
@@ -747,6 +1243,27 @@ void Mat::create(const std::vector<int>& _sizes, int _type)
```

Review comment:
disagree. For empty Mat we should return empty shape. This is very natural extension of the function domain that may eliminate some conditions and still keep the code absolutely safe.
**File:** modules/core/include/opencv2/core.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1176

**Code Changes:**
```diff
+/** @brief Broadcast the given Mat to the given shape.
+ * @param src input array
+ * @param shape target shape. Note that negative values are not supported.
+ * @param dst output array that has the given shape
+ */
+CV_EXPORTS void broadcast(InputArray src, const MatShape& shape, OutputArray dst);
+
 enum RotateFlags {
     ROTATE_90_CLOCKWISE = 0, //!<Rotate 90 degrees clockwise
     ROTATE_180 = 1, //!<Rotate 180 degrees clockwise
```

Review comment:
this is overload of the previous function that preserves order of parameters
**File:** modules/core/include/opencv2/core/mat.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 171

**Code Changes:**
```diff
+    std::string str() const;
+
+    int dims;
+    DataLayout layout;
+    int C;
+    int p[MAX_DIMS];
+};
+
+CV_EXPORTS bool operator == (const MatShape& shape1, const MatShape& shape2);
+CV_EXPORTS bool operator != (const MatShape& shape1, const MatShape& shape2);
+
```

Review comment:
this is for compatibility with a lot of OpenCV code if we replace `MatSize size` inside `cv::Mat` with `MatShape size` at some point
**File:** modules/dnn/src/graph_buffer_allocator.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 332

**Code Changes:**
```diff
+};
+
+void Net::Impl::assignBuffers()
+{
+    BufferAllocator buf_allocator(this);
+    buf_allocator.assign();
+}
+
+CV__DNN_INLINE_NS_END
+}}
```

Review comment:
buffer allocation (or rather a buffer assignment) is crucial and necessary preprocessing stage in the new engine. Without it you cannot call forward. Some other stages, such as fusion, could be potentially disabled; this is TODO.
**File:** modules/core/include/opencv2/core/operations.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 489

**Code Changes:**
```diff
@@ -484,6 +485,11 @@ int print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)
     return print(Formatter::get()->format(cv::Mat(matx)), stream);
 }
 
+// numpy/ONNXRuntime-style matrix pretty-printer
+CV_EXPORTS std::ostream& pprint(std::ostream& strm, InputArray tensor, int indent=0,
+                                int edge=3, int wholeTensorThreshold=100,
+                                char parens='\0');
+
 //! @endcond
 
```

Review comment:
Better name is needed here.
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -42,6 +42,7 @@
 #ifndef OPENCV_DNN_DNN_HPP
 #define OPENCV_DNN_DNN_HPP
 
+#include <ostream>
 #include <vector>
 #include <opencv2/core.hpp>
 #include "opencv2/core/async.hpp"
@@ -61,7 +62,6 @@ CV__DNN_INLINE_NS_BEGIN
 //! @addtogroup dnn
```

Review comment:
I propose to use enum here: - old engine - new engine - auto (fallback). It makes regression testing easier and unblock other backends.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1432

**Code Changes:**
```diff
         BaseConvolutionLayerImpl::finalize(inputs_arr, outputs_arr);
@@ -1420,6 +1429,11 @@ class DeConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
         inputs_arr.getMatVector(inputs);
         outputs_arr.getMatVector(outputs);
 
+        CV_Assert(inputs.size() > 1 || !blobs.empty());
+
+        MatShape weightShape = blobs.empty() ? inputs[1].shape() : blobs[0].shape();
+        numOutput = weightShape[1]*groups;
+
         std::vector<int> inpShape;
```

Review comment:
Why do you need assert here?
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1875

**Code Changes:**
```diff
-                   forward_ocl(inputs_arr, outputs_arr, internals_arr));
+        // For some reason, tests for deconvolution fail;
+        // Also, the current implementation is super-inefficient,
+        // Just disabled it. Need to rewrite it and then uncomment back these lines
+        //CV_OCL_RUN(IS_DNN_OPENCL_TARGET(preferableTarget),
+        //           forward_ocl(inputs_arr, outputs_arr, internals_arr));
 
-        if (inputs_arr.depth() == CV_16F)
+        if (inputs_arr.depth(0) == CV_16F)
         {
             forward_fallback(inputs_arr, outputs_arr, internals_arr);
```

Review comment:
Please disable the test in the test name and file a bug about the issue.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1913

**Code Changes:**
```diff
+        pprint(std::cout, inputs[0], 0, 3, 100, '[');
+        printf("\nDeConvolution Weights: ");
+        pprint(std::cout, weightsMat, 0, 3, 100, '[');
+        printf("\nDeConvolution Bias: ");
+        pprint(std::cout, biasesMat, 0, 3, 100, '[');
+        printf("\n");*/
+
+        //for (size_t ii = 0; ii < outputs.size(); ii++)
         {
-            int ngroups = outCn / blobs[0].size[1];
-            int inpGroupCn = inpCn / ngroups;
```

Review comment:
remove dead code.
**File:** modules/dnn/src/layers/flatten_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -65,10 +65,14 @@ namespace dnn
 class FlattenLayerImpl CV_FINAL : public FlattenLayer
 {
 public:
+    bool _onnxMode;
+
     FlattenLayerImpl(const LayerParams &params)
     {
         _startAxis = params.get<int>("axis", 1);
         _endAxis = params.get<int>("end_axis", -1);
```

Review comment:
please file github bug about it.
**File:** modules/dnn/src/layers/reshape2_layer.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 68

**Code Changes:**
```diff
+    virtual bool dynamicOutputShapes() const CV_OVERRIDE
+    {
+        // [TODO] fix. If the 'shape' spec is attribute,
+        // or if shape is a constant 2nd input of the layer,
+        // then the output shape can be inferred from the input tensor shape.
+        // That is, dynamicShapeSpec is not quite incorrect.
+        return dynamicShapeSpec;
+    }
+
+    virtual bool supportBackend(int backendId) CV_OVERRIDE
+    {
```

Review comment:
File github bug.
**File:** modules/ts/src/ts_func.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -1505,8 +1505,14 @@ double norm(InputArray _src1, InputArray _src2, int normType, InputArray _mask)
     normType = normType == NORM_L2SQR ? NORM_L2 : normType;
 
     CV_CheckTypeEQ(src1.type(), src2.type(), "");
-    CV_Assert(src1.size == src2.size);
-    CV_Assert( mask.empty() || (src1.size == mask.size && (mask.type() == CV_8U || mask.type() == CV_Bool)) );
+    MatShape shape1 = src1.shape();
+    MatShape shape2 = src2.shape();
+    if (shape1 != shape2) {
+        printf("shape1: %s\n", shape1.str().c_str());
```

Review comment:
remove dead code.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 49

**Code Changes:**
```diff
     {
         std::vector<MatShape> inLayerShapes;
         std::vector<MatShape> outLayerShapes;
-        net.getLayerShapes(MatShape(), CV_32F, 0, inLayerShapes, outLayerShapes);
+        std::vector<MatShape> suggestedShapes;
+        std::vector<int> suggestedTypes;
+        for (const Mat& inp: inps) {
+            suggestedShapes.push_back(inp.shape());
+            suggestedTypes.push_back(inp.type());
+        }
+        net.getLayerShapes(suggestedShapes, suggestedTypes, 0, inLayerShapes, outLayerShapes);
```

Review comment:
call vector.reserve() to reduce mallocs.
**File:** modules/dnn/test/test_model.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 105

**Code Changes:**
```diff
                                const std::string& inImgPath, const std::string& outImgPath,
                                float norm, const Size& size = {-1, -1}, Scalar mean = Scalar(),
-                               double scale = 1.0, bool swapRB = false, bool crop = false, const std::string outname = "")
+                               double scale = 1.0, bool swapRB = false, bool crop = false,
+                               const std::vector<std::string>& outnames=std::vector<std::string>())
     {
         checkBackend();
 
@@ -115,8 +116,8 @@ class Test_Model : public DNNTestLayer
         model.setPreferableBackend(backend);
         model.setPreferableTarget(target);
```

Review comment:
is it used somewhere?
**File:** modules/dnn/test/test_layers.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -231,7 +231,7 @@ void testReshape(const MatShape& inputShape, const MatShape& targetShape,
     runLayer(rl, inpVec, outVec);
 
     Mat& out = outVec[0];
-    MatShape shape(out.size.p, out.size.p + out.dims);
+    MatShape shape = out.shape();
     EXPECT_EQ(shape, targetShape);
 }
 
@@ -502,9 +502,9 @@ TEST_F(Layer_LSTM_Test, get_set_test)
```

Review comment:
File a github bug.
**File:** modules/dnn/test/test_backends.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 520

**Code Changes:**
```diff
 #endif
-    expectNoFallbacksFromCUDA(net);
+    // BUG: https://github.com/opencv/opencv/issues/26306
+    // Temporarily disabled check for no "fallbacks", since the new engine does not support CUDA yet
+    //expectNoFallbacksFromCUDA(net);
 }
 
 INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets(/* withInferenceEngine = */ true,
```

Review comment:
force old engine here?
**File:** modules/dnn/src/net_impl_fuse.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -662,6 +662,15 @@ void Net::Impl::fuseLayers(const std::vector<LayerPin>& blobsToKeep_)
         if (preferableBackend != DNN_BACKEND_OPENCV && preferableBackend != DNN_BACKEND_CUDA)
             continue;  // Go to the next layer.
 
+        // [TODO] temporarily disabled Concat optimization.
+        //
+        // Ticket: https://github.com/opencv/opencv/issues/26195
+        //
+        // It's not quite compatible with dynamic shapes,
+        // so we need to make sure that we correctly predicted shapes
```

Review comment:
File github bug
**File:** modules/dnn/src/net_impl2.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 928

**Code Changes:**
```diff
+
+// [TODO]
+// The current 'pure' shape inference is quite fragile, it does not handle any dynamic cases
+// or even some seemingly dynamic cases.
+// It would be nice maybe to some optional speculative forward() with some dummy inputs when
+// straight-forward shape inference mechanism failed.
+bool Net::Impl::tryInferGraphShapes(const Ptr<Graph>& graph,
+                                    std::vector<MatShape>& shapeCache,
+                                    std::vector<MatType>& typeCache) const
+{
+    if (!graph)
```

Review comment:
File github issue.
**File:** modules/dnn/src/net_impl2.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 556

**Code Changes:**
```diff
+     }
+
+     for (int k = 0; k < mshape.dims; k++) {
+        checkAndUpdateDim(graph, Node(), inp, k, tsize.size[k]);
+     }
+    */
+
+    if (adata.kind == DNN_ARG_INPUT) {
+        int adata_type = adata.type;
+        if ((adata_type == CV_16F || adata_type == CV_16BF) && !enableFP16)
+            adata_type = CV_32F;
```

Review comment:
Need to be fixed before merge.
**File:** modules/dnn/src/net_impl2.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 556

**Code Changes:**
```diff
+     }
+
+     for (int k = 0; k < mshape.dims; k++) {
+        checkAndUpdateDim(graph, Node(), inp, k, tsize.size[k]);
+     }
+    */
+
+    if (adata.kind == DNN_ARG_INPUT) {
+        int adata_type = adata.type;
+        if ((adata_type == CV_16F || adata_type == CV_16BF) && !enableFP16)
+            adata_type = CV_32F;
```

Review comment:
disagree. It's quite difficult to fix properly. It will surely breaks some test cases that just ignore shapes in the model and pass tensors with completely different shapes
**File:** modules/dnn/src/net_impl_fuse.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -662,6 +662,15 @@ void Net::Impl::fuseLayers(const std::vector<LayerPin>& blobsToKeep_)
         if (preferableBackend != DNN_BACKEND_OPENCV && preferableBackend != DNN_BACKEND_CUDA)
             continue;  // Go to the next layer.
 
+        // [TODO] temporarily disabled Concat optimization.
+        //
+        // Ticket: https://github.com/opencv/opencv/issues/26195
+        //
+        // It's not quite compatible with dynamic shapes,
+        // so we need to make sure that we correctly predicted shapes
```

Review comment:
Concat optimization is incompatible with dynamic shapes. It will be disabled anyway in the new engine. So it's not a bug actually
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1432

**Code Changes:**
```diff
         BaseConvolutionLayerImpl::finalize(inputs_arr, outputs_arr);
@@ -1420,6 +1429,11 @@ class DeConvolutionLayerImpl CV_FINAL : public BaseConvolutionLayerImpl
         inputs_arr.getMatVector(inputs);
         outputs_arr.getMatVector(outputs);
 
+        CV_Assert(inputs.size() > 1 || !blobs.empty());
+
+        MatShape weightShape = blobs.empty() ? inputs[1].shape() : blobs[0].shape();
+        numOutput = weightShape[1]*groups;
+
         std::vector<int> inpShape;
```

Review comment:
because we need deconvolution weights. They come as extra input or as a blob.
**File:** modules/dnn/include/opencv2/dnn/dnn.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine

**Code Changes:**
```diff
@@ -42,6 +42,7 @@
 #ifndef OPENCV_DNN_DNN_HPP
 #define OPENCV_DNN_DNN_HPP
 
+#include <ostream>
 #include <vector>
 #include <opencv2/core.hpp>
 #include "opencv2/core/async.hpp"
@@ -61,7 +62,6 @@ CV__DNN_INLINE_NS_BEGIN
 //! @addtogroup dnn
```

Review comment:
it's temporary solution. The boolean flag should be removed by 5.0 gold release, since there is a plan to completely migrate to the new engine.
**File:** modules/core/include/opencv2/core/operations.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 489

**Code Changes:**
```diff
@@ -484,6 +485,11 @@ int print(const Matx<_Tp, m, n>& matx, FILE* stream = stdout)
     return print(Formatter::get()->format(cv::Mat(matx)), stream);
 }
 
+// numpy/ONNXRuntime-style matrix pretty-printer
+CV_EXPORTS std::ostream& pprint(std::ostream& strm, InputArray tensor, int indent=0,
+                                int edge=3, int wholeTensorThreshold=100,
+                                char parens='\0');
+
 //! @endcond
 
```

Review comment:
It's a very good name, see https://docs.python.org/3/library/pprint.html for example
**File:** modules/dnn/src/net_impl2.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 556

**Code Changes:**
```diff
+     }
+
+     for (int k = 0; k < mshape.dims; k++) {
+        checkAndUpdateDim(graph, Node(), inp, k, tsize.size[k]);
+     }
+    */
+
+    if (adata.kind == DNN_ARG_INPUT) {
+        int adata_type = adata.type;
+        if ((adata_type == CV_16F || adata_type == CV_16BF) && !enableFP16)
+            adata_type = CV_32F;
```

Review comment:
It means that the tests should be fixed.
**File:** modules/dnn/src/net_impl.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 75

**Code Changes:**
```diff
+    enableFP16 = haveFP16 = false;
+    // FP16 is not ready yet in the new DNN engine
+    // Ticket: https://github.com/opencv/opencv/issues/26196
+    /*if (checkHardwareSupport(CV_CPU_FP16)) {
+        enableFP16 = haveFP16 = true;
+    }*/
+
+    tracingMode = DNN_TRACE_NONE;
+    profilingMode = DNN_PROFILE_NONE;
+
+    dump_strm = &std::cout;
```

Review comment:
the code belongs to the new engine, I do whatever I want with it. FP16 support in the new engine is not ready yet.
**File:** modules/objc/generator/CMakeLists.txt
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 94

**Code Changes:**
```diff
@@ -91,7 +91,7 @@ macro(ocv_add_objc_generated_target TARGET)
   file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}")
   add_custom_command(
       OUTPUT ${objc_generated_files} "${objc_${TARGET}_generated_output_dependecy}"
-      COMMAND ${PYTHON_DEFAULT_EXECUTABLE} "${OBJC_SOURCE_DIR}/generator/gen_objc.py"
+      COMMAND ${PYTHON3_EXECUTABLE} "${OBJC_SOURCE_DIR}/generator/gen_objc.py"
               -p "${OBJC_SOURCE_DIR}/../python/src2/gen2.py"
               -c "${CONFIG_FILE}"
               -t "${TARGET}"
```

Review comment:
macos does not supply python 2.x for a long time already; the previous code causes compile errors. I fixed the bug and now ios framework is generated properly.
**File:** modules/dnn/test/test_onnx_importer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 49

**Code Changes:**
```diff
     {
         std::vector<MatShape> inLayerShapes;
         std::vector<MatShape> outLayerShapes;
-        net.getLayerShapes(MatShape(), CV_32F, 0, inLayerShapes, outLayerShapes);
+        std::vector<MatShape> suggestedShapes;
+        std::vector<int> suggestedTypes;
+        for (const Mat& inp: inps) {
+            suggestedShapes.push_back(inp.shape());
+            suggestedTypes.push_back(inp.type());
+        }
+        net.getLayerShapes(suggestedShapes, suggestedTypes, 0, inLayerShapes, outLayerShapes);
```

Review comment:
do you really want me to waste time optimizing tests? )
**File:** modules/dnn/test/test_model.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 105

**Code Changes:**
```diff
                                const std::string& inImgPath, const std::string& outImgPath,
                                float norm, const Size& size = {-1, -1}, Scalar mean = Scalar(),
-                               double scale = 1.0, bool swapRB = false, bool crop = false, const std::string outname = "")
+                               double scale = 1.0, bool swapRB = false, bool crop = false,
+                               const std::vector<std::string>& outnames=std::vector<std::string>())
     {
         checkBackend();
 
@@ -115,8 +116,8 @@ class Test_Model : public DNNTestLayer
         model.setPreferableBackend(backend);
         model.setPreferableTarget(target);
```

Review comment:
yes, the previous implementation assumed that all semantic segmentation models produce a single output. Apparently, this is not the case with some models in OpenCV extra. Somehow this bug did not cause any problems in the old engine; the new engine is more strict.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1875

**Code Changes:**
```diff
-                   forward_ocl(inputs_arr, outputs_arr, internals_arr));
+        // For some reason, tests for deconvolution fail;
+        // Also, the current implementation is super-inefficient,
+        // Just disabled it. Need to rewrite it and then uncomment back these lines
+        //CV_OCL_RUN(IS_DNN_OPENCL_TARGET(preferableTarget),
+        //           forward_ocl(inputs_arr, outputs_arr, internals_arr));
 
-        if (inputs_arr.depth() == CV_16F)
+        if (inputs_arr.depth(0) == CV_16F)
         {
             forward_fallback(inputs_arr, outputs_arr, internals_arr);
```

Review comment:
Disabled test won't fix the broken implementation. I fixed it.
**File:** modules/dnn/test/test_backends.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 520

**Code Changes:**
```diff
 #endif
-    expectNoFallbacksFromCUDA(net);
+    // BUG: https://github.com/opencv/opencv/issues/26306
+    // Temporarily disabled check for no "fallbacks", since the new engine does not support CUDA yet
+    //expectNoFallbacksFromCUDA(net);
 }
 
 INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets(/* withInferenceEngine = */ true,
```

Review comment:
the model works correctly with the new engine; but the extra check that verifies that the engine really used all CUDA layers fails. I think, using the new engine to test correct model processing is more important than switching to the old engine.
**File:** modules/dnn/src/net_impl2.cpp
**Change Type:** added
**Context:** PR #26056: New dnn engine
**Review Line:** 556

**Code Changes:**
```diff
+     }
+
+     for (int k = 0; k < mshape.dims; k++) {
+        checkAndUpdateDim(graph, Node(), inp, k, tsize.size[k]);
+     }
+    */
+
+    if (adata.kind == DNN_ARG_INPUT) {
+        int adata_type = adata.type;
+        if ((adata_type == CV_16F || adata_type == CV_16BF) && !enableFP16)
+            adata_type = CV_32F;
```

Review comment:
that's a lot of work. Maybe another 2 weeks. If someone has that much time, please, go ahead. The new engine does no less sanity checks than the old engine and is more robust in general. The commented off code is some extra feature on top of the old engine; it can be polished and enabled in the later PRs after alpha.
**File:** modules/dnn/src/layers/convolution_layer.cpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 92

**Code Changes:**
```diff
-#ifdef HAVE_WEBNN
-        groups = ngroups;
-#endif
-        CV_Assert(numOutput % ngroups == 0);
+        numOutput = -1;
+        groups = params.get<int>("group", 1);
 
         if (kernel_size.size() == 2) {
             kernel = Size(kernel_size[1], kernel_size[0]);
@@ -122,18 +117,19 @@ class BaseConvolutionLayerImpl : public ConvolutionLayer
 
```

Review comment:
For asmorkalov: Need to check.
**File:** modules/core/include/opencv2/core.hpp
**Change Type:** modified
**Context:** PR #26056: New dnn engine
**Review Line:** 1176

**Code Changes:**
```diff
+/** @brief Broadcast the given Mat to the given shape.
+ * @param src input array
+ * @param shape target shape. Note that negative values are not supported.
+ * @param dst output array that has the given shape
+ */
+CV_EXPORTS void broadcast(InputArray src, const MatShape& shape, OutputArray dst);
+
 enum RotateFlags {
     ROTATE_90_CLOCKWISE = 0, //!<Rotate 90 degrees clockwise
     ROTATE_180 = 1, //!<Rotate 180 degrees clockwise
```

Review comment:
These is design requirement which is stated on Wiki contribution guidelines / coding style guide: 1. Input tensors 2. Output tensors 3. Other parameters. --- > overload of the previous function not related answer.