Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4.2k
    • Issues 4.2k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • 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
  • #23322
Closed
Open
Issue created Mar 13, 2022 by Eyal Rozenberg@eyalrozContributor

CUDA: cmake still fails to correctly identify and report GCC-CUDA version mismatch

I'm using cmake 3.23.0-rc2. On a system with GCC 10 being the default C++ compiler and CUDA 10.2.89 installed, trying to configure a CUDA project yields:

CMake Error at /opt/versions/cmake/3.23.0-rc2/share/cmake-3.23/Modules/CMakeDetermineCUDACompiler.cmake:632 (message):
  Failed to detect a default CUDA architecture.

  

  Compiler output:

Call Stack (most recent call first):
  CMakeLists.txt:19 (PROJECT)

Now, that's an untrue statement in itself, but never mind. The point is that we should be told the C++ compiler NVCC is using is incompatible with it; or at least - we should be forwarded the explicit error that NVCC emits. It's certainly not the problem that I have an ambiguous CUDA architecture in any way.

Also, if I repeat the cmake configuration command, I get:

CMake Error at /opt/versions/cmake/3.23.0-rc2/share/cmake-3.23/Modules/CMakeDetermineCUDACompiler.cmake:310 (message):
  CMAKE_CUDA_ARCHITECTURES must be valid if set.
Call Stack (most recent call first):
  CMakeLists.txt:19 (PROJECT)

So, right back at ya: If you set CMAKE_CUDA_ARCHITECTURES, then make it valid.

This is a sort-of continuation of issue #23010 (closed).

Edited Mar 15, 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