Skip to content

[opencv4] feat: pass CUDA_ARCHITECTURES#51659

Open
air-hand wants to merge 4 commits into
microsoft:masterfrom
air-hand:feat/opencv4-cuda-arch
Open

[opencv4] feat: pass CUDA_ARCHITECTURES#51659
air-hand wants to merge 4 commits into
microsoft:masterfrom
air-hand:feat/opencv4-cuda-arch

Conversation

@air-hand
Copy link
Copy Markdown

@air-hand air-hand commented May 11, 2026

Pass CUDA_ARCHITECTURES through as CMAKE_CUDA_ARCHITECTURES when building opencv4 with the cuda feature.

This lets users configure CUDA architectures from their triplet instead of falling back to OpenCV's default CUDA architecture selection, which can trigger unnecessary CUDA compilation.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version, or no changes were necessary.
  • Any fixed CI baseline and CI feature baseline entries are removed from that file, or no entries needed to be changed.
  • All patch files in the port are applied and succeed.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Exactly one version is added in each modified versions file.

@air-hand
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@air-hand air-hand marked this pull request as ready for review May 11, 2026 22:31
FILENAME "opencv-cache/nvidia_optical_flow/a73cd48b18dcc0cc8933b30796074191-edb50da3cf849840d680249aa6dbef248ebce2ca.zip"
SHA512 12d655ac9fcfc6df0186daa62f7185dadd489f0eeea25567d78c2b47a9840dcce2bd03a3e9b3b42f125dbaf3150f52590ea7597dc1dc8acee852dc0aed56651e
)
if(DEFINED CUDA_ARCHITECTURES)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable lacks documentation, is this supposed to be a well-known environment variable? Otherwise, we may want to add a comment for users of the port to know this is a triplet variable.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vicroms

Thanks for your review.

Updated in 3e7fa12

I used CUDA_ARCHITECTURES here to match the existing darknet port pattern.
The name also lines up with CMake's CUDA_ARCHITECTURES target property.

@vicroms vicroms marked this pull request as draft May 12, 2026 21:53
@air-hand air-hand marked this pull request as ready for review May 13, 2026 12:19
@air-hand air-hand requested a review from vicroms May 13, 2026 12:20
@air-hand
Copy link
Copy Markdown
Author

Sorry, I missed updating the version database.

I've added it now 19d779c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants