Skip to content

Not accepting "all-major" at installation

Required prerequisites

  • Make sure you've read the documentation. Your issue may be addressed there.
  • Search the issue tracker and discussions to verify that this hasn't already been reported. +1 or comment there if it has.

What commit version of aidge do you use

  • dev branch

Problem description

Impossible to install without a NVIDIA board.

Don't know if this a regression.

Please provide logs in the form of a code block

(env_aidge) farges@DESKTOP-IPACP95:~/aidge/aidge/aidge_backend_cuda$ export
declare -x AIDGE_WITH_CUDA="OFF"
declare -x AMENT_PREFIX_PATH="/opt/ros/jazzy"
declare -x CMAKE_CUDA_ARCHITECTURE="all-major"
declare -x CMAKE_CUDA_ARCHITECTURES="all-major"
declare -x CMAKE_CUDA_ARCHITECURE="all-major"
declare -x CMAKE_CUDA_ARCHITECURES="all-major"
...
(env_aidge) farges@DESKTOP-IPACP95:~/aidge/aidge/aidge_backend_cuda$ pip install .
Processing /home/farges/aidge/aidge/aidge_backend_cuda
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /home/farges/aidge/env_aidge/lib/python3.12/site-packages (from aidge_backend_cuda==0.6.1) (2.2.4)
Building wheels for collected packages: aidge_backend_cuda
  Building wheel for aidge_backend_cuda (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for aidge_backend_cuda (pyproject.toml) did not run successfully.
exit code: 1
  ╰─> [60 lines of output]
      /tmp/pip-build-env-aaq6beon/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
      !!

              ********************************************************************************
              Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).

              By 2026-Feb-18, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        corresp(dist, value, root_dir)
      running bdist_wheel
      running build
      running build_py
      copying aidge_backend_cuda/benchmark.py -> build/lib.linux-x86_64-cpython-312/aidge_backend_cuda
      copying aidge_backend_cuda/__init__.py -> build/lib.linux-x86_64-cpython-312/aidge_backend_cuda
      running egg_info
      /tmp/pip-build-env-aaq6beon/overlay/lib/python3.12/site-packages/pbr/git.py:28: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
        import pkg_resources
      writing aidge_backend_cuda.egg-info/PKG-INFO
      writing dependency_links to aidge_backend_cuda.egg-info/dependency_links.txt
      writing requirements to aidge_backend_cuda.egg-info/requires.txt
      writing top-level names to aidge_backend_cuda.egg-info/top_level.txt
      reading manifest file 'aidge_backend_cuda.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'LICENCE'
      adding license file 'LICENSE'
      writing manifest file 'aidge_backend_cuda.egg-info/SOURCES.txt'
      running build_ext
      cmake /home/farges/aidge/aidge/aidge_backend_cuda -DTEST=OFF -DCMAKE_INSTALL_PREFIX:PATH=/home/farges/aidge/env_aidge/lib/libAidge -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DENABLE_ASAN=OFF -DCUDA=OFF -DPYBIND=ON -DPYBIND11_FINDPYTHON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCOVERAGE=OFF -DCMAKE_CUDA_ARCHITECTURES=native
      -- Project name: aidge_backend_cuda
      -- Project version: 0.6.1
      -- Latest git commit: 7ebbfe7
      -- Cuda compiler version =
      -- CUDA STANDARD : 14
      -- CUDA ARCHITECTURE : native
      -- The CUDA compiler identification is unknown
      -- Check for working CUDA compiler: /usr/local/cuda
      CMake Error in /home/farges/aidge/aidge/aidge_backend_cuda/build/CMakeFiles/CMakeScratch/TryCompile-kuRkdj/CMakeLists.txt:
        CUDA_ARCHITECTURES is set to "native", but no NVIDIA GPU was detected.


      CMake Error: Error required internal CMake variable not set, cmake may not be built correctly.
      Missing variable is:
      _CMAKE_CUDA_WHOLE_FLAG
      CMake Error in /home/farges/aidge/aidge/aidge_backend_cuda/build/CMakeFiles/CMakeScratch/TryCompile-kuRkdj/CMakeLists.txt:
        CUDA_ARCHITECTURES is set to "native", but no NVIDIA GPU was detected.


      CMake Error at /tmp/pip-build-env-aaq6beon/overlay/lib/python3.12/site-packages/cmake/data/share/cmake-4.0/Modules/CMakeTestCUDACompiler.cmake:48 (try_compile):
        Failed to generate test project build system.
      Call Stack (most recent call first):
        CMakeLists.txt:94 (enable_language)


      -- Configuring incomplete, errors occurred!
      error: command '/tmp/pip-build-env-aaq6beon/overlay/bin/cmake' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for aidge_backend_cuda
Failed to build aidge_backend_cuda
ERROR: Could not build wheels for aidge_backend_cuda, which is required to install pyproject.toml-based projects
(

It seems that on line 83 of the CMakeLists.txt there is CMAKE_CUDA_ARCHITECURE instead of CMAKE_CUDA_ARCHITECTURE. Moreover on line 92 the printed variable is CMAKE_CUDA_ARCHITECTURES with 'S'. Despite setting all those environment variables to "all-major", the passed argument to cmake is -DCMAKE_CUDA_ARCHITECTURES=native.