mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:37:53 -04:00
feat: add auditwheel for manylinux
This commit is contained in:
@@ -65,7 +65,7 @@ jobs:
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt install -y ninja-build clang time
|
||||
pip install -U pip setuptools==75.8.0 wheel packaging psutil
|
||||
pip install -U pip setuptools==75.8.0 wheel packaging psutil auditwheel
|
||||
|
||||
- name: Build wheels
|
||||
id: build_wheels
|
||||
@@ -75,12 +75,23 @@ jobs:
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Apply auditwheel repair
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel repair flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Test
|
||||
run: |
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: ${{ inputs.is-upload }}
|
||||
env:
|
||||
@@ -88,12 +99,18 @@ jobs:
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload the release asset using GitHub CLI
|
||||
gh release upload "$tag_name" "$wheel_path" --clobber
|
||||
gh release upload "$tag_name" "$wheel_path_manylinux" --clobber
|
||||
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt install -y ninja-build clang
|
||||
pip install -U pip setuptools==75.8.0 wheel packaging psutil
|
||||
pip install -U pip setuptools==75.8.0 wheel packaging psutil auditwheel
|
||||
|
||||
- name: Build wheels
|
||||
timeout-minutes: 2160
|
||||
@@ -242,6 +242,13 @@ jobs:
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Apply auditwheel repair
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel repair flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Test
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -249,6 +256,10 @@ jobs:
|
||||
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
if: ${{ inputs.is-upload }}
|
||||
shell: bash
|
||||
@@ -257,15 +268,21 @@ jobs:
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload the release asset using GitHub CLI
|
||||
gh release upload "$tag_name" "$wheel_path" --clobber
|
||||
gh release upload "$tag_name" "$wheel_path_manylinux" --clobber
|
||||
|
||||
- name: Clean up
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user