File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 run : |
2121 pip install auditwheel "build<=1.4.2" patchelf setuptools
2222 python setup.py clean --all
23- MLX_DISABLE_SM90A_KERNELS=1 MLX_BUILD_STAGE=2 python -m build -w
23+ MLX_BUILD_STAGE=2 python -m build -w
2424
2525 auditwheel repair dist/mlx_cuda*.whl \
2626 --plat manylinux_2_35_${{ inputs.arch }} \
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ inputs:
1414 description : ' Whether to enable ccache'
1515 required : false
1616 default : ' true'
17+ ccache-key :
18+ required : false
19+ default : ' ccache'
1720
1821runs :
1922 using : " composite"
3336 if : ${{ inputs.use-ccache == 'true' }}
3437 uses : hendrikmuhs/ccache-action@v1.2
3538 with :
36- key : ccache-${{ runner.os }}-${{ runner.arch }}-${{ inputs.toolkit }}
39+ key : ${{ inputs. ccache-key }} -${{ runner.os }}-${{ runner.arch }}-${{ inputs.toolkit }}
3740 max-size : 1GB
3841 # ccache-action bug: running "apt-get update" fails on large arm runner.
3942 update-package-index : false
Original file line number Diff line number Diff line change @@ -85,20 +85,24 @@ jobs:
8585
8686 build_cuda_release :
8787 if : github.repository == 'ml-explore/mlx'
88- runs-on : ubuntu-22-large
88+ strategy :
89+ matrix :
90+ arch : ['x86_64', 'aarch64']
91+ toolkit : ['cuda-12.9', 'cuda-13.0']
92+ runs-on : ${{ matrix.arch == 'x86_64' && 'ubuntu-22-large' || 'ubuntu-22-large-arm' }}
8993 steps :
9094 - uses : actions/checkout@v6
9195 - uses : ./.github/actions/setup-linux
9296 with :
93- toolkit : ' cuda-12.9'
97+ toolkit : ${{ matrix.toolkit }}
98+ ccache-key : ' ccache-release'
9499 - name : Build Python package
95100 uses : ./.github/actions/build-cuda-release
96101 with :
97- toolkit : ' cuda-12.9'
98- arch : ' x86_64'
102+ arch : ${{ matrix.arch }}
99103 - name : Upload artifacts
100104 uses : actions/upload-artifact@v7
101105 with :
102- name : mlx-cuda
106+ name : mlx-${{ matrix.toolkit }}-${{ matrix.arch }}
103107 path : wheelhouse/mlx_cuda_*.whl
104108 retention-days : 7
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ jobs:
146146 - uses : ./.github/actions/setup-linux
147147 with :
148148 toolkit : ${{ matrix.toolkit }}
149- use- ccache: false
149+ ccache-key : ' ccache-release '
150150 - name : Build Python package
151151 uses : ./.github/actions/build-cuda-release
152152 with :
Original file line number Diff line number Diff line change @@ -168,9 +168,8 @@ set_target_properties(mlx PROPERTIES CUDA_ARCHITECTURES
168168 "${MLX_CUDA_ARCHITECTURES} " )
169169
170170# Skip Hopper-only kernels when not building for sm90a.
171- if (NOT DEFINED ENV{MLX_DISABLE_SM90A_KERNELS}
172- AND (("90a" IN_LIST MLX_CUDA_ARCHITECTURES) OR ("90a-real" IN_LIST
173- MLX_CUDA_ARCHITECTURES)))
171+ if (("90a" IN_LIST MLX_CUDA_ARCHITECTURES) OR ("90a-real" IN_LIST
172+ MLX_CUDA_ARCHITECTURES))
174173 target_compile_definitions (mlx PRIVATE MLX_CUDA_SM90A_ENABLED )
175174endif ()
176175
You can’t perform that action at this time.
0 commit comments