mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-11 23:14:50 +08:00
Add CUDA toolkit bin to $PATH
This commit is contained in:
@@ -1,18 +1,13 @@
|
|||||||
name: 'Build CUDA wheel'
|
name: 'Build CUDA wheel'
|
||||||
description: 'Build CUDA wheel'
|
description: 'Build CUDA wheel'
|
||||||
|
|
||||||
inputs:
|
|
||||||
toolkit:
|
|
||||||
description: 'The CUDA toolkit'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Build package
|
- name: Build package
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
CMAKE_ARGS: -DMLX_BUILD_CUDA=ON -DCMAKE_CUDA_COMPILER=/usr/local/${{ inputs.toolkit }}/bin/nvcc
|
CMAKE_ARGS: -DMLX_BUILD_CUDA=ON
|
||||||
run: |
|
run: |
|
||||||
pip install auditwheel build patchelf setuptools
|
pip install auditwheel build patchelf setuptools
|
||||||
python setup.py clean --all
|
python setup.py clean --all
|
||||||
|
|||||||
1
.github/actions/build-linux/action.yml
vendored
1
.github/actions/build-linux/action.yml
vendored
@@ -18,7 +18,6 @@ runs:
|
|||||||
-DMLX_BUILD_CUDA=OFF
|
-DMLX_BUILD_CUDA=OFF
|
||||||
CMAKE_ARGS_CUDA: >-
|
CMAKE_ARGS_CUDA: >-
|
||||||
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
||||||
-DCMAKE_CUDA_COMPILER=/usr/local/${{ inputs.toolkit }}/bin/nvcc
|
|
||||||
-DMLX_BUILD_CUDA=ON
|
-DMLX_BUILD_CUDA=ON
|
||||||
run: |
|
run: |
|
||||||
export CMAKE_ARGS="$CMAKE_ARGS_${{ startsWith(inputs.toolkit, 'cuda') && 'CUDA' || 'CPU' }}"
|
export CMAKE_ARGS="$CMAKE_ARGS_${{ startsWith(inputs.toolkit, 'cuda') && 'CUDA' || 'CPU' }}"
|
||||||
|
|||||||
3
.github/actions/setup-linux/action.yml
vendored
3
.github/actions/setup-linux/action.yml
vendored
@@ -51,8 +51,6 @@ runs:
|
|||||||
# Note: the CI machine does not meet CUDA 13's driver requirement.
|
# Note: the CI machine does not meet CUDA 13's driver requirement.
|
||||||
# Compatibility matrix:
|
# Compatibility matrix:
|
||||||
# https://docs.nvidia.com/deeplearning/cudnn/backend/latest/reference/support-matrix.html
|
# https://docs.nvidia.com/deeplearning/cudnn/backend/latest/reference/support-matrix.html
|
||||||
# The `nvcc` is installed into `/usr/local/cuda-VERSION/bin/nvcc` - but
|
|
||||||
# it's *not* on the default toolkit path.
|
|
||||||
PACKAGES: |
|
PACKAGES: |
|
||||||
{
|
{
|
||||||
"cuda-12.6": "libcudnn9-dev-cuda-12 cuda-toolkit-12-6",
|
"cuda-12.6": "libcudnn9-dev-cuda-12 cuda-toolkit-12-6",
|
||||||
@@ -67,6 +65,7 @@ runs:
|
|||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
libnccl2 libnccl-dev \
|
libnccl2 libnccl-dev \
|
||||||
${{ fromJson(env.PACKAGES)[inputs.toolkit] }}
|
${{ fromJson(env.PACKAGES)[inputs.toolkit] }}
|
||||||
|
echo "/usr/local/${{ inputs.toolkit }}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: CUDA packages and driver report
|
- name: CUDA packages and driver report
|
||||||
if: ${{ startsWith(inputs.toolkit, 'cuda') }}
|
if: ${{ startsWith(inputs.toolkit, 'cuda') }}
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -139,8 +139,6 @@ jobs:
|
|||||||
toolkit: 'cuda-12.9'
|
toolkit: 'cuda-12.9'
|
||||||
- name: Build Python package
|
- name: Build Python package
|
||||||
uses: ./.github/actions/build-cuda-release
|
uses: ./.github/actions/build-cuda-release
|
||||||
with:
|
|
||||||
toolkit: 'cuda-12.9'
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user