mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-06-30 23:57:53 -04:00
ci: refactor wheel path variables and adjust build matrix
- Replace WHEEL_NAME variables with WHEEL_PATH to store full file paths instead of just filenames, eliminating redundant directory concatenation - Update all workflow references to use WHEEL_PATH directly in install and upload commands - Simplify manylinux wheel handling by storing full paths in output variables - Reduce tested versions in Linux self-hosted matrix to focus on Python 3.14 - Reduce tested versions in ARM64 self-hosted matrix to focus on Python 3.14 and flash-attn 2.8.3 - Apply formatting standardization to Windows CodeBuild matrix
This commit is contained in:
@@ -78,13 +78,13 @@ jobs:
|
||||
run: |
|
||||
chmod +x build_linux.sh
|
||||
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }}
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
|
||||
echo "WHEEL_PATH=$wheel_path" >> $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 }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
@@ -93,33 +93,30 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
|
||||
|
||||
wheel_path="${{ steps.build_wheels.outputs.WHEEL_PATH }}"
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Upload the release asset using GitHub CLI
|
||||
gh release upload "$tag_name" "$wheel_path" --clobber
|
||||
|
||||
- name: Apply auditwheel repair
|
||||
continue-on-error: true
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
auditwheel repair \
|
||||
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
|
||||
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
|
||||
wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
|
||||
echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test manylinux wheel
|
||||
continue-on-error: true
|
||||
run: |
|
||||
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 }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload manylinux wheel
|
||||
@@ -127,7 +124,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
wheel_path_manylinux="${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}"
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
|
||||
@@ -116,14 +116,14 @@ jobs:
|
||||
run: |
|
||||
chmod +x build_linux.sh
|
||||
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }}
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
|
||||
echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Test
|
||||
shell: bash
|
||||
run: |
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
wheel_path="${{ steps.build_wheels.outputs.WHEEL_PATH }}"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
@@ -147,18 +147,18 @@ jobs:
|
||||
- name: Apply auditwheel repair
|
||||
continue-on-error: true
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
auditwheel repair \
|
||||
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
|
||||
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
|
||||
wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
|
||||
echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test manylinux wheel
|
||||
continue-on-error: true
|
||||
run: |
|
||||
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 }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload manylinux wheel
|
||||
@@ -166,7 +166,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
wheel_path_manylinux="${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}"
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
|
||||
@@ -270,14 +270,14 @@ jobs:
|
||||
run: |
|
||||
chmod +x build_linux.sh
|
||||
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }}
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
|
||||
echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Test
|
||||
shell: bash
|
||||
run: |
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
@@ -287,7 +287,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
wheel_path="${{ steps.build_wheels.outputs.WHEEL_PATH }}"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
@@ -301,18 +301,18 @@ jobs:
|
||||
- name: Apply auditwheel repair
|
||||
continue-on-error: true
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
auditwheel repair \
|
||||
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
|
||||
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
|
||||
wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
|
||||
echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test manylinux wheel
|
||||
continue-on-error: true
|
||||
run: |
|
||||
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 }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload manylinux wheel
|
||||
@@ -320,7 +320,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
wheel_path_manylinux="${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}"
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
|
||||
@@ -107,14 +107,14 @@ jobs:
|
||||
run: |
|
||||
chmod +x build_linux.sh
|
||||
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }}
|
||||
wheel_name=$(basename $(ls flash-attention/dist/*.whl | head -n 1))
|
||||
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT
|
||||
wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
|
||||
echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Test
|
||||
shell: bash
|
||||
run: |
|
||||
pip uninstall -y flash-attn > /dev/null 2>&1
|
||||
pip install --no-cache-dir flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload Release Asset
|
||||
@@ -124,7 +124,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag_name=${{ github.ref_name }}
|
||||
wheel_path="flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}"
|
||||
wheel_path="${{ steps.build_wheels.outputs.WHEEL_PATH }}"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$wheel_path" ]; then
|
||||
@@ -138,18 +138,18 @@ jobs:
|
||||
- name: Apply auditwheel repair
|
||||
continue-on-error: true
|
||||
run: |
|
||||
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }}
|
||||
auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
|
||||
auditwheel repair \
|
||||
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
|
||||
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux
|
||||
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1))
|
||||
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT
|
||||
${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
|
||||
wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
|
||||
echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Test manylinux wheel
|
||||
continue-on-error: true
|
||||
run: |
|
||||
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 }}
|
||||
pip install --no-cache-dir ${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}
|
||||
python -c "import flash_attn; print(flash_attn.__version__)"
|
||||
|
||||
- name: Upload manylinux wheel
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}"
|
||||
wheel_path_manylinux="${{ steps.build_wheels.outputs.WHEEL_PATH_MANYLINUX }}"
|
||||
if [ ! -f "$wheel_path_manylinux" ]; then
|
||||
echo "Error: Wheel file not found at $wheel_path_manylinux"
|
||||
exit 1
|
||||
|
||||
+37
-22
@@ -90,19 +90,20 @@ LINUX_ARM64_MATRIX = {
|
||||
|
||||
LINUX_SELF_HOSTED_MATRIX = {
|
||||
"flash-attn-version": [
|
||||
"2.7.4",
|
||||
"2.8.3",
|
||||
"2.6.3",
|
||||
# "2.7.4",
|
||||
# "2.8.3",
|
||||
],
|
||||
"python-version": [
|
||||
"3.10",
|
||||
"3.11",
|
||||
"3.12",
|
||||
"3.13",
|
||||
# "3.10",
|
||||
# "3.11",
|
||||
# "3.12",
|
||||
# "3.13",
|
||||
"3.14",
|
||||
],
|
||||
"torch-version": ["2.9.1"],
|
||||
"cuda-version": [
|
||||
"12.8",
|
||||
# "12.8",
|
||||
"13.0",
|
||||
],
|
||||
}
|
||||
@@ -110,26 +111,27 @@ LINUX_SELF_HOSTED_MATRIX = {
|
||||
LINUX_ARM64_SELF_HOSTED_MATRIX = {
|
||||
"flash-attn-version": [
|
||||
# "2.6.3",
|
||||
"2.7.4",
|
||||
# "2.8.3",
|
||||
# "2.7.4",
|
||||
"2.8.3",
|
||||
],
|
||||
"python-version": [
|
||||
"3.10",
|
||||
"3.11",
|
||||
"3.12",
|
||||
# "3.10",
|
||||
# "3.11",
|
||||
# "3.12",
|
||||
# "3.13",
|
||||
"3.14",
|
||||
],
|
||||
"torch-version": [
|
||||
"2.5.1",
|
||||
"2.6.0",
|
||||
"2.7.1",
|
||||
# "2.5.1",
|
||||
# "2.6.0",
|
||||
# "2.7.1",
|
||||
# "2.8.0",
|
||||
"2.9.1",
|
||||
],
|
||||
"cuda-version": [
|
||||
"12.4",
|
||||
# "12.4",
|
||||
# "12.6",
|
||||
"12.8",
|
||||
# "12.8",
|
||||
# "12.9",
|
||||
"13.0",
|
||||
],
|
||||
@@ -164,10 +166,23 @@ WINDOWS_MATRIX = {
|
||||
}
|
||||
|
||||
WINDOWS_CODEBUILD_MATRIX = {
|
||||
"flash-attn-version": ["2.6.3", "2.7.4.post1", "2.8.3"],
|
||||
"python-version": ["3.10", "3.11", "3.12", "3.13"],
|
||||
"torch-version": ["2.9.1"],
|
||||
"cuda-version": ["13.0"],
|
||||
"flash-attn-version": [
|
||||
"2.6.3",
|
||||
"2.7.4.post1",
|
||||
"2.8.3",
|
||||
],
|
||||
"python-version": [
|
||||
"3.10",
|
||||
"3.11",
|
||||
"3.12",
|
||||
"3.13",
|
||||
],
|
||||
"torch-version": [
|
||||
"2.9.1",
|
||||
],
|
||||
"cuda-version": [
|
||||
"13.0",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +200,7 @@ def main():
|
||||
"linux_self_hosted": LINUX_SELF_HOSTED_MATRIX,
|
||||
#
|
||||
# "linux_arm64_self_hosted": False,
|
||||
# "linux_arm64_self_hosted": LINUX_ARM64_SELF_HOSTED_MATRIX,
|
||||
"linux_arm64_self_hosted": LINUX_ARM64_SELF_HOSTED_MATRIX,
|
||||
#
|
||||
"windows": False,
|
||||
# "windows": WINDOWS_MATRIX,
|
||||
|
||||
Reference in New Issue
Block a user