Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,107
    • Issues 4,107
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #22375
Closed
Open
Issue created Jul 02, 2021 by Eyal Rozenberg@eyalrozContributor

CUDA: Support a "native" option for CUDA_ARCHITECTURES

At the moment, if you want to build a CUDA application target your own system's GPU, you need to either manually specify the architecture, e.g.

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES 70)

or use the CUDA_SELECT_NVCC_ARCH_FLAGS mechanism (see also this issue).

That is too cumbersome. I don't see any reason why the following shouldn't work:

set_property(TARGET tgt PROPERTY CUDA_ARCHITECTURES auto)

which would just perform the equivalent of CUDA_SELECT_NVCC_ARCH_FLAGS behind the scenes (with caching of course).

Bikeshedding: Capitalization (auto? Auto? AUTO)? Use of system or system-devices or system-gpus or available-gpus?

Edited Mar 04, 2022 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking