Skip to content

[CMAKE] CUDA virtual architectures support ? #24739

@chacha21

Description

@chacha21

When building OpenCV with CMake and CUDA support, the architectures options are defined through CUDA_ARCH_BIN and CUDA_ARCH_PTX
However, CMake (>= 3.8) also supports CUDA_ARCHITECTURES which can be used to map to the virtual architectures of nvcc "all" (CMake 3.23+), "all-major" (CMake 3.23+) and "native" (CMake 3.24+)
(I can't find when it was introduced in nvcc https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html )

When setting "all-major" in CUDA_ARCH_BIN, OpenCV will compile cuda code... but it is unclear if it is really using that feature or if it defaults to something.

What is the current status of CMake's CUDA_ARCHITECTURES support in OpenCV's CMakefile ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions