Set MLX_CUDA_ARCHITECTURES for arm64 CUDA build

This commit is contained in:
Cheng
2025-11-22 14:30:25 +09:00
parent b7e678bea7
commit 153d8e524c

View File

@@ -13,15 +13,13 @@ runs:
shell: sh shell: sh
env: env:
DEBUG: 1 DEBUG: 1
CMAKE_ARGS_CPU: >- CMAKE_ARGS: >-
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DMLX_BUILD_CUDA=OFF -DMLX_BUILD_CUDA=${{ startsWith(inputs.toolkit, 'cuda') && 'ON' || 'OFF' }}
CMAKE_ARGS_CUDA: >-
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DMLX_BUILD_CUDA=ON
run: | run: |
export CMAKE_ARGS="$CMAKE_ARGS_${{ startsWith(inputs.toolkit, 'cuda') && 'CUDA' || 'CPU' }}"
if ${{ startsWith(inputs.toolkit, 'cuda') && runner.arch == 'arm64' }} ; then if ${{ startsWith(inputs.toolkit, 'cuda') && runner.arch == 'arm64' }} ; then
# There is no GPU in arm64 runner.
CMAKE_ARGS="$CMAKE_ARGS -DMLX_CUDA_ARCHITECTURES=90a"
# Can not build tests when the built executables can not run. # Can not build tests when the built executables can not run.
CMAKE_ARGS="$CMAKE_ARGS -DMLX_BUILD_TESTS=OFF" CMAKE_ARGS="$CMAKE_ARGS -DMLX_BUILD_TESTS=OFF"
fi fi