Commit Graph

136 Commits

Author SHA1 Message Date
cudawarped
10f6cbf41c Fix 24789 2023-12-29 16:58:05 +02:00
cudawarped
7d681cf80d build: first class cuda support 2023-12-26 09:39:18 +03:00
chacha21
6d2064b32f added URL to understand CUDA options
A reference to https://docs.opencv.org/4.x/d2/dbc/cuda_intro.html is given.
This page is not up-to-date but it can evolve independently
2023-12-22 08:10:56 +01:00
Stefan Isak
5bffcdf7e8
Merge pull request #24382 from sisakat:cuda-compile-multicore
Enable multicore CUDA compilation #24382

CUDA source files are compiled single threaded. The option `--threads` was introduced in NVCC 11.2. The option specifies the number of threads to be used for compilation (see [NVIDIA NVCC Documentation](https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#threads-number-t)).

With CMake 3.12 the environment variable `CMAKE_BUILD_PARALLEL_LEVEL` was introduced (see [CMake Documentation](https://cmake.org/cmake/help/latest/envvar/CMAKE_BUILD_PARALLEL_LEVEL.html)). This variable is used to set the NVCC `--threads` option.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [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
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2023-10-19 13:13:21 +03:00
cudawarped
358e3065ab cuda: add default ptx when CUDA_ARCH_BIN is missing and allow CUDA_ARCH_PTX to be passed in isolation 2023-08-12 11:09:06 +03:00
CSBVision
6ea22535e2 Fixes #23187 (part 1)
Supports delay-loading for Ninja generators and Python bindings.
2023-02-07 09:04:06 +01:00
cudawarped
927aa1e617 cuda: add ada lovelace and hopper cuda arch 2023-01-09 15:44:37 +02:00
Alexander Alekhin
1bc3077890 cmake: VERSION_GREATER_EQUAL is not supported in CMake 3.5.1 2022-12-26 17:41:53 +00:00
cudawarped
5e03305da5 build: only disable win32 cuda warnings on CUDA SDK >= 11.2 2022-12-21 17:09:41 +02:00
cudawarped
b1288dad40 Enable cudacodec libs by default, prevent their locations being lost when cmake is re-run and add log info when the libs/headers cannot be found. 2022-12-15 15:01:31 +02:00
Alexander Smorkalov
81aaca8c04
Merge pull request #22675 from CSBVision:patch-2
Update OpenCVDetectCUDA.cmake
2022-12-14 15:41:34 +03:00
CSBVision
332ff4bf1c Update OpenCVDetectCUDA.cmake
Adds the option to enable delay loading of CUDA DLLs on Windows. This is particularly useful to use the same binary on systems with and without CUDA support without distributing the CUDA DLLs to systems that cannot use them at all due to missing CUDA-supported hardware.
Resolves #13509
2022-12-13 17:40:53 +01:00
cudawarped
45d04175d4 Suppress
warning #1394-D: field of class type without a DLL interface used in a class with a DLL interface
from windows CUDA builds.
2022-11-16 11:14:17 +02:00
cudawarped
be670e168a
Merge pull request #22615 from cudawarped:nvcuvenc
Update CMake rules to include Nvidia Video Codec SDK encoding libs
2022-10-28 11:03:51 +03:00
Alexander Alekhin
2ebdc04787 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2022-08-14 15:50:42 +00:00
Tomoaki Teshima
2336b0706d add support for Orin GPU 2022-06-29 20:35:27 +09:00
Alexander Alekhin
907743eee7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-07-30 14:50:36 +00:00
Xerxes Battiwalla
1e1984a586
Fixed typo in error message in OpenCVDetectCUDA.cmake
There was a minor typo in the FATAL error message when the specified CUDA generation does not match any known generation
2021-07-26 14:54:27 +10:00
Alexander Alekhin
c8ebe0eb86 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-11 17:19:22 +00:00
Alexander Alekhin
171fbf879f cmake: fix typo in CUDA_GENERATION=Auto cache 2020-10-09 22:00:02 +00:00
Alexander Alekhin
295afd5882 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-28 21:33:29 +00:00
Tomoaki Teshima
ac58b2f857 compute capability 8.6
- CC for RTX3090, RTX3080 and RTX3070
2020-09-25 22:33:55 +09:00
Alexander Alekhin
fa25faa2d2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-08-06 14:15:52 +00:00
Tomoaki Teshima
d92af2aa85 * stop showing old generations
* keep it possible to build for old CC
  * make sure old generations don't come up for the choice
  * remove related version check of old one
2020-07-29 17:31:39 +09:00
Alexander Alekhin
e5e767abc1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-13 19:54:49 +00:00
Tomoaki Teshima
269b810601 re-enable automatic CC detection on Jetson
* treat both CMAKE_C_COMPILER and c_compiler_realpath as candidate
2020-07-12 21:22:12 +09:00
Alexander Alekhin
8bf1b9a422 cmake(cuda): repair ccbin, re-implement execute_process() cache
- preventive fix for arch "11.0" (CUDA_ARCH_BIN_OR_PTX_10 bug)
- new var: OPENCV_CUDA_DETECTION_NVCC_FLAGS
- new var: OPENCV_CMAKE_CUDA_DEBUG
2020-07-08 07:34:17 +00:00
Alexander Alekhin
e0f9eac521 cmake: backport CUDA scripts 2020-07-08 07:33:54 +00:00
Alexander Alekhin
524a2fffe9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-06 23:05:04 +00:00
Alexander Alekhin
eb6678ebef
Merge pull request #17699 from alalek:build_core_cuda
* core(cuda): fix build

- MSVS 19.25.28612.0
- CUDA release 11.0, V11.0.167

* cmake(cuda): backport workaround for CUDA 11

* cmake(cuda): call CUDA_BUILD_CLEAN_TARGET() on finalize

* cmake(cuda): use CMAKE_SUPPRESS_REGENERATION with MSVS
2020-07-06 22:58:17 +00:00
Alexander Smorkalov
0ccc839397 Restored compatibility with CMake older than 3.7. 2020-06-30 11:28:36 +03:00
Alexander Alekhin
98ad7d01d5 cmake(cuda): update handling of -std=c++11/14 flags 2020-06-29 01:49:00 +03:00
cyy
206c843f36
Merge pull request #17499 from cyyever:fix_CUDA11
Fix cuda11

* use cudnn_version.h to detect version when it is available

* remove nppi from CUDA11

* use ocv_list_filterout

* dnn(cuda): temporary disable CUDNN 8.0
2020-06-27 20:34:44 +00:00
Alexander Alekhin
c62e63909a Merge pull request #17671 from tomoaki0705:fixCUDANativeDetection 2020-06-26 22:51:34 +00:00
Tomoaki Teshima
4cec9e5ff1 fix native detection on Jetson 2020-06-26 16:36:59 +09:00
Alexander Alekhin
c81d785ada Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-23 19:15:47 +00:00
Tomoaki Teshima
95ac650af6 make the fail safe path actually safe
* use only supported CC in the list
  * workaround of #17526
2020-06-21 07:20:47 +09:00
Alexander Alekhin
5ed65460d1 Merge pull request #17526 from cyyever:fix_cuda_detection 2020-06-20 21:07:05 +00:00
Tomoaki Teshima
52844614c4 add Ampere CC
* Ampere has CC 8.0
  * Arm64 server support has been added in CUDA 11 (only V100 for now)
2020-06-19 20:46:18 +09:00
Alexander Alekhin
e3d502310f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-19 07:33:50 +00:00
Alexander Alekhin
6bd87e8146 Merge pull request #17571 from tomoaki0705:fixAutomaticCC 2020-06-18 07:39:14 +00:00
Tomoaki Teshima
1cba763189 fix build error of automatic CC detection 2020-06-17 22:02:51 +09:00
Alexander Alekhin
d01cbe9320 cudacodec(build): fix detection in CMake, cleanup duplicate includes 2020-06-17 09:09:40 +00:00
Tomoaki Teshima
d4af89781b fix corner case of libnvcuvid
* detect header automatically and not based on version number
2020-06-11 23:06:18 +09:00
cyy
c6638d62e6 respect CUDA_HOST_COMPILER when detecting CUDA arch 2020-06-11 15:57:08 +08:00
Alexander Alekhin
7722a2b8a8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-04 17:58:34 +00:00
Tomoaki Teshima
156406b56c select the architecture based on nvcc result
* cache the result
  * DRY
  * brush up based on review
2020-06-02 05:07:53 +09:00
Alexander Alekhin
ba7b0f4c54 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-15 11:23:46 +00:00
Alexander Alekhin
a45928045a
Merge pull request #16150 from alalek:cmake_avoid_deprecated_link_private
* cmake: avoid deprecated LINK_PRIVATE/LINK_PUBLIC

see CMP0023 (CMake 2.8.12+)

* cmake: fix 3rdparty list

- don't include OpenCV modules
2019-12-13 17:52:40 +03:00
Vishal Chiluka
bca49b99ca Removing static linking of cuda library 2019-08-05 21:42:10 +05:30