Skip to content

MatA.dot(MatB) gives incorrect results in some cases on SpaceMIT K1 #27003

@fengyuentau

Description

@fengyuentau

System Information

Latest 4.x

Detailed description

Logs:


[ RUN      ] MatType_Length_dot.dot/24, where GetParam() = (32SC1, 32)
 Expected:
[2.237623528685399e+19]
 Actual:
[-5.141074065282274e+19]
/home/tao/workspace/fytao/k1/worktree/co-spacemit-4x-merge-20250303/opencv/modules/ts/src/ts_perf.cpp:580: Failure
Failed
  Relative difference (7.3786975939676733e+19 of 308464443916936.38 allowed) between argument "product" and expected value is greater than 9.9999999999999995e-07 in 1 points
params    = (32SC1, 32)
termination reason:  unknown
bytesIn   =       8192
bytesOut  =          0
samples   =         63 of 100
outliers  =          5
frequency = 1000000000
min       =       2208 = 0.00ms
median    =       2250 = 0.00ms
gmean     =       2246 = 0.00ms
gstddev   = 0.02745984 = 0.00ms for 97% dispersion interval
mean      =       2246 = 0.00ms
stddev    =         65 = 0.00ms
[  FAILED  ] MatType_Length_dot.dot/24, where GetParam() = (32SC1, 32) (4 ms)

...

[  FAILED  ] 6 tests, listed below:
[  FAILED  ] MatType_Length_dot.dot/24, where GetParam() = (32SC1, 32)
[  FAILED  ] MatType_Length_dot.dot/25, where GetParam() = (32SC1, 64)
[  FAILED  ] MatType_Length_dot.dot/26, where GetParam() = (32SC1, 128)
[  FAILED  ] MatType_Length_dot.dot/27, where GetParam() = (32SC1, 256)
[  FAILED  ] MatType_Length_dot.dot/28, where GetParam() = (32SC1, 512)
[  FAILED  ] MatType_Length_dot.dot/29, where GetParam() = (32SC1, 1024)

Steps to reproduce

Steps to reproduce:

  1. Clone latest opencv and opencv_extra repos.
  2. Build OpenCV for SpaceMIT K1 using their toolchain.
  3. Run perf with sanity check:
./build/bin/opencv_perf_data --gtest_filter="MatType_Length_dot.dot/2*"

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the 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