opencv/modules/dnn
Aliaksei Urbanski 35ca2f78d6
Merge pull request #25880 from Jamim:fix/cuda-no-fp16
Fix CUDA for old GPUs without FP16 support #25880

Fixes #21461

~This is a build-time solution that reflects https://github.com/opencv/opencv/blob/4.10.0/modules/dnn/src/cuda4dnn/init.hpp#L68-L82.~
~We shouldn't add an invalid target while building with `CUDA_ARCH_BIN` < 53.~
_(please see [this discussion](https://github.com/opencv/opencv/pull/25880#discussion_r1668074505))_

This is a run-time solution that basically reverts [these lines](d0fe6ad109 (diff-757c5ab6ddf2f99cdd09f851e3cf17abff203aff4107d908c7ad3d0466f39604L245-R245)).

I've debugged these changes, [coupled with other fixes](https://github.com/gentoo/gentoo/pull/37479), on [Gentoo Linux](https://www.gentoo.org/) and [related tests passed](https://github.com/user-attachments/files/16135391/opencv-4.10.0.20240708-224733.log.gz) on my laptop with `GeForce GTX 960M`.

Alternative solution:
  - #21462

_Best regards!_

### Pull Request Readiness Checklist

- [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
- [x] There is a reference to the original bug report and related work
- [ ] `n/a` There is accuracy test, performance test and test data in opencv_extra repository, if applicable
- [ ] `n/a` The feature is well documented and sample code can be built with the project CMake
2024-07-10 12:39:30 +03:00
..
cmake Add Definition "_USE_MATH_DEFINES" for dnn plugin on Win32 build 2024-04-07 21:08:09 +09:00
include/opencv2 Merge pull request #25810 from fengyuentau:python/fix_parsing_3d_mat_in_dnn 2024-07-04 08:33:20 +03:00
misc Merge pull request #25810 from fengyuentau:python/fix_parsing_3d_mat_in_dnn 2024-07-04 08:33:20 +03:00
perf Merge pull request #25147 from fengyuentau:dnn/elementwise_layers/speedup 2024-07-08 14:24:36 +03:00
src Merge pull request #25880 from Jamim:fix/cuda-no-fp16 2024-07-10 12:39:30 +03:00
test Merge pull request #25880 from Jamim:fix/cuda-no-fp16 2024-07-10 12:39:30 +03:00
CMakeLists.txt Merge pull request #25230 from hanliutong/rvv-conv 2024-03-31 16:47:06 +03:00