From c6b3d3be9a16c1b8998b97403eeefac92ff1e070 Mon Sep 17 00:00:00 2001 From: Cheng Date: Sat, 22 Nov 2025 15:22:02 +0900 Subject: [PATCH] Better comments --- .github/actions/build-linux/action.yml | 2 +- mlx/backend/cuda/CMakeLists.txt | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/build-linux/action.yml b/.github/actions/build-linux/action.yml index b4538bc2a..d8c004059 100644 --- a/.github/actions/build-linux/action.yml +++ b/.github/actions/build-linux/action.yml @@ -18,7 +18,7 @@ runs: -DMLX_BUILD_CUDA=${{ startsWith(inputs.toolkit, 'cuda') && 'ON' || 'OFF' }} run: | if ${{ startsWith(inputs.toolkit, 'cuda') && runner.arch == 'arm64' }} ; then - # There is no GPU in arm64 runner. + # There is no GPU in arm64 runner, use a common arch. CMAKE_ARGS="$CMAKE_ARGS -DMLX_CUDA_ARCHITECTURES=90a" # Can not build tests when the built executables can not run. CMAKE_ARGS="$CMAKE_ARGS -DMLX_BUILD_TESTS=OFF" diff --git a/mlx/backend/cuda/CMakeLists.txt b/mlx/backend/cuda/CMakeLists.txt index 5a61e651b..a8cdea5cb 100644 --- a/mlx/backend/cuda/CMakeLists.txt +++ b/mlx/backend/cuda/CMakeLists.txt @@ -123,19 +123,18 @@ if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 12.8.0) mlx PRIVATE "$<$:--compress-mode=size>") endif() -# Use the native CUDA arch for current device when there is no one specified. +# Use native CUDA arch by default. if(NOT DEFINED MLX_CUDA_ARCHITECTURES) execute_process( COMMAND __nvcc_device_query OUTPUT_VARIABLE MLX_CUDA_ARCHITECTURES OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "__nvcc_device_query: ${MLX_CUDA_ARCHITECTURES}") - set(UPGRADABLE_COMPUTE_COMPATIBILITIES "90;100;121") + set(UPGRADABLE_ARCHITECTURES "90;100;121") if(MLX_CUDA_ARCHITECTURES STREQUAL "") message( FATAL_ERROR "Can not get native CUDA arch, must set MLX_CUDA_ARCHITECTURES") - elseif(MLX_CUDA_ARCHITECTURES IN_LIST UPGRADABLE_COMPUTE_COMPATIBILITIES) + elseif(MLX_CUDA_ARCHITECTURES IN_LIST UPGRADABLE_ARCHITECTURES) # Use arch-specific compute capability whenever possible. set(MLX_CUDA_ARCHITECTURES "${MLX_CUDA_ARCHITECTURES}a") else()