mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Set MLX_CUDA_ARCHITECTURES for arm64 CUDA build
This commit is contained in:
10
.github/actions/build-linux/action.yml
vendored
10
.github/actions/build-linux/action.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user