Skip to content

Commit 44ab082

Browse files
committed
Use the correct repo for arm64 CUDA
1 parent b87265e commit 44ab082

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

.github/actions/build-linux/action.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ inputs:
99
runs:
1010
using: "composite"
1111
steps:
12-
- name: Set cmake args
13-
shell: bash
12+
- name: Install Python package
13+
shell: sh
1414
env:
15+
DEBUG: 1
1516
CMAKE_ARGS_CPU: >-
1617
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
1718
-DMLX_BUILD_CUDA=OFF
@@ -20,22 +21,16 @@ runs:
2021
-DCMAKE_CUDA_COMPILER=/usr/local/${{ inputs.toolkit }}/bin/nvcc
2122
-DMLX_BUILD_CUDA=ON
2223
run: |
23-
CMAKE_ARGS="$CMAKE_ARGS_${{ startsWith(inputs.toolkit, 'cuda') && 'CUDA' || 'CPU' }}"
24-
# FIXME: Unable to build tests without libnccl on arm64.
24+
export CMAKE_ARGS="$CMAKE_ARGS_${{ startsWith(inputs.toolkit, 'cuda') && 'CUDA' || 'CPU' }}"
2525
if ${{ startsWith(inputs.toolkit, 'cuda') && runner.arch == 'arm64' }} ; then
26+
# Can not build tests when the built executables can not run.
2627
CMAKE_ARGS="$CMAKE_ARGS -DMLX_BUILD_TESTS=OFF"
2728
fi
29+
pip install --no-build-isolation -e ".[dev]" -v
30+
# Pass the CMAKE_ARGS to following steps.
2831
echo CMAKE_ARGS="$CMAKE_ARGS" > $GITHUB_ENV
2932
30-
- name: Install Python package
31-
shell: sh
32-
env:
33-
DEBUG: 1
34-
run: pip install --no-build-isolation -e ".[dev]" -v
35-
3633
- name: Generate package stubs
37-
# FIXME: Unable to generate stubs without libnccl on arm64.
38-
if: ${{ !(startsWith(inputs.toolkit, 'cuda') && runner.arch == 'arm64') }}
3934
shell: sh
4035
run: |
4136
pip install typing_extensions

.github/actions/setup-linux/action.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,13 @@ runs:
6060
"cuda-13.0": "libcudnn9-dev-cuda-13 cuda-toolkit-13-0"
6161
}
6262
run: |
63-
export ARCH=${{ runner.arch == 'arm64' && 'arm64' || 'x86_64' }}
63+
export ARCH=${{ runner.arch == 'arm64' && 'sbsa' || 'x86_64' }}
6464
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/$ARCH/cuda-keyring_1.1-1_all.deb
6565
sudo dpkg -i cuda-keyring_1.1-1_all.deb
6666
sudo apt-get update
67-
sudo apt-get install -y ${{ fromJson(env.PACKAGES)[inputs.toolkit] }}
68-
69-
- name: Install NCCL
70-
# For some reason NVIDIA did not provide arm64 package for libnccl2.
71-
if: ${{ startsWith(inputs.toolkit, 'cuda') && runner.arch != 'arm64' }}
72-
shell: bash
73-
run: sudo apt-get install -y libnccl2 libnccl-dev
67+
sudo apt-get install -y \
68+
libnccl2 libnccl-dev \
69+
${{ fromJson(env.PACKAGES)[inputs.toolkit] }}
7470
7571
- name: CUDA packages and driver report
7672
if: ${{ startsWith(inputs.toolkit, 'cuda') }}

0 commit comments

Comments
 (0)