1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00
Vadim Pisarevsky fd4491fcb1 dnn: map FP16 input types to FP32 in getFLOPS for the new graph engine
The new graph engine has no FP16 execution path yet and runs FP32 on CPU
regardless of the requested target. When an OpenCL FP16 target is requested,
callers may pass CV_16F input types to Net::getFLOPS(), which then flow through
tryInferShapes() -> Layer::getTypes() and get rejected (CV_16F is only allowed
when preferableTarget == DNN_TARGET_OPENCL_FP16, which the new engine never sets).

Normalize FP16 input types to FP32 in the mainGraph path of getFLOPS via a small
filterFP16InputTypes() helper. This fixes the OCL_FP16 parameterization of the
DNNTestNetwork perf tests (e.g. YuNet_320/640/1280) which crashed in getFLOPS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-18 02:28:41 +03:00
2026-05-25 17:49:25 +03:00
2026-07-14 09:19:26 +03:00
2018-10-11 17:57:51 +00:00
2025-08-07 10:35:20 +03:00
2024-04-02 16:39:54 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.

Additional Resources

S
Description
No description provided
Readme Apache-2.0 3.3 GiB
Languages
C++ 87.6%
C 3.1%
Python 2.9%
CMake 2%
Java 1.5%
Other 2.7%