mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 19:42:41 +00:00
external/openembedded-layer: add CUDA 12.6 build patch to opencv
Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
committed by
Matt Madison
parent
78a1abfd5a
commit
e0b75858e5
@@ -0,0 +1,58 @@
|
||||
From 09eb618804588f77026924096d848800630c8d6f Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
|
||||
Date: Tue, 3 Sep 2024 13:47:48 +0300
|
||||
Subject: [PATCH] Workaround for CUDA 12.6 tuple_size issue #3773.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/opencv/opencv_contrib/pull/3785]
|
||||
Signed-off-by: Matt Madison <matt@madison.systems>
|
||||
|
||||
---
|
||||
modules/cudaarithm/src/cuda/polar_cart.cu | 20 +++++---------------
|
||||
1 file changed, 5 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/modules/cudaarithm/src/cuda/polar_cart.cu b/modules/cudaarithm/src/cuda/polar_cart.cu
|
||||
index 725f5741..c65b894b 100644
|
||||
--- a/modules/cudaarithm/src/cuda/polar_cart.cu
|
||||
+++ b/modules/cudaarithm/src/cuda/polar_cart.cu
|
||||
@@ -159,25 +159,15 @@ void cv::cuda::cartToPolar(InputArray _xy, OutputArray _mag, OutputArray _angle,
|
||||
GpuMat_<float> magc(mag);
|
||||
GpuMat_<float> anglec(angle);
|
||||
|
||||
+ gridTransformUnary(globPtr<float2>(xy), globPtr<float>(magc), magnitude_interleaved_func<float2>(), stream);
|
||||
+
|
||||
if (angleInDegrees)
|
||||
{
|
||||
- auto f1 = magnitude_interleaved_func<float2>();
|
||||
- auto f2 = direction_interleaved_func<float2, true>();
|
||||
- cv::cudev::tuple<decltype(f1), decltype(f2)> f12 = cv::cudev::make_tuple(f1, f2);
|
||||
- gridTransformTuple(globPtr<float2>(xy),
|
||||
- tie(magc, anglec),
|
||||
- f12,
|
||||
- stream);
|
||||
+ gridTransformUnary(globPtr<float2>(xy), globPtr<float>(anglec), direction_interleaved_func<float2, true>(), stream);
|
||||
}
|
||||
else
|
||||
{
|
||||
- auto f1 = magnitude_interleaved_func<float2>();
|
||||
- auto f2 = direction_interleaved_func<float2, false>();
|
||||
- cv::cudev::tuple<decltype(f1), decltype(f2)> f12 = cv::cudev::make_tuple(f1, f2);
|
||||
- gridTransformTuple(globPtr<float2>(xy),
|
||||
- tie(magc, anglec),
|
||||
- f12,
|
||||
- stream);
|
||||
+ gridTransformUnary(globPtr<float2>(xy), globPtr<float>(anglec), direction_interleaved_func<float2, false>(), stream);
|
||||
}
|
||||
|
||||
syncOutput(mag, _mag, stream);
|
||||
@@ -191,7 +181,7 @@ void cv::cuda::cartToPolar(InputArray _xy, OutputArray _magAngle, bool angleInDe
|
||||
CV_Assert( xy.type() == CV_32FC2 );
|
||||
|
||||
GpuMat magAngle = getOutputMat(_magAngle, xy.size(), CV_32FC2, stream);
|
||||
-
|
||||
+
|
||||
if (angleInDegrees)
|
||||
{
|
||||
gridTransformUnary(globPtr<float2>(xy),
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -17,6 +17,7 @@ EXTRA_OECMAKE:append:cuda = ' -DOPENCV_CUDA_DETECTION_NVCC_FLAGS="-ccbin ${CUDAH
|
||||
SRC_URI:append:cuda = " \
|
||||
file://0001-Fix-search-paths-in-FindCUDNN.cmake.patch \
|
||||
file://0002-Fix-broken-override-of-CUDA_TOOLKIT_TARGET_DIR-setti.patch \
|
||||
file://0001-Workaround-for-CUDA-12.6-tuple_size-issue-3773.patch;patchdir=contrib \
|
||||
"
|
||||
|
||||
OPTICALFLOW_MD5 = "a73cd48b18dcc0cc8933b30796074191"
|
||||
|
||||
Reference in New Issue
Block a user