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:
Junya Morioka
2025-12-13 17:25:23 +09:00
parent 5d44bd8cd6
commit a7b3fe362e
5 changed files with 77 additions and 65 deletions
+10 -13
View File
@@ -78,13 +78,13 @@ jobs:
run: | run: |
chmod +x build_linux.sh chmod +x build_linux.sh
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }} ./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)) wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
- name: Install Test - name: Install Test
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload Release Asset - name: Upload Release Asset
@@ -93,33 +93,30 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
tag_name=${{ github.ref_name }} 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 # Check if the file exists
if [ ! -f "$wheel_path" ]; then if [ ! -f "$wheel_path" ]; then
echo "Error: Wheel file not found at $wheel_path" echo "Error: Wheel file not found at $wheel_path"
exit 1 exit 1
fi fi
# Upload the release asset using GitHub CLI # Upload the release asset using GitHub CLI
gh release upload "$tag_name" "$wheel_path" --clobber gh release upload "$tag_name" "$wheel_path" --clobber
- name: Apply auditwheel repair - name: Apply auditwheel repair
continue-on-error: true continue-on-error: true
run: | run: |
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
auditwheel repair \ auditwheel repair \
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \ --exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux ${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)) wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
- name: Test manylinux wheel - name: Test manylinux wheel
continue-on-error: true continue-on-error: true
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload manylinux wheel - name: Upload manylinux wheel
@@ -127,7 +124,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | 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 if [ ! -f "$wheel_path_manylinux" ]; then
echo "Error: Wheel file not found at $wheel_path_manylinux" echo "Error: Wheel file not found at $wheel_path_manylinux"
exit 1 exit 1
@@ -116,14 +116,14 @@ jobs:
run: | run: |
chmod +x build_linux.sh chmod +x build_linux.sh
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }} ./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)) wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
- name: Install Test - name: Install Test
shell: bash shell: bash
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload Release Asset - name: Upload Release Asset
@@ -133,7 +133,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
tag_name=${{ github.ref_name }} 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 # Check if the file exists
if [ ! -f "$wheel_path" ]; then if [ ! -f "$wheel_path" ]; then
@@ -147,18 +147,18 @@ jobs:
- name: Apply auditwheel repair - name: Apply auditwheel repair
continue-on-error: true continue-on-error: true
run: | run: |
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
auditwheel repair \ auditwheel repair \
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \ --exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux ${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)) wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
- name: Test manylinux wheel - name: Test manylinux wheel
continue-on-error: true continue-on-error: true
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload manylinux wheel - name: Upload manylinux wheel
@@ -166,7 +166,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | 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 if [ ! -f "$wheel_path_manylinux" ]; then
echo "Error: Wheel file not found at $wheel_path_manylinux" echo "Error: Wheel file not found at $wheel_path_manylinux"
exit 1 exit 1
+10 -10
View File
@@ -270,14 +270,14 @@ jobs:
run: | run: |
chmod +x build_linux.sh chmod +x build_linux.sh
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }} ./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)) wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
- name: Install Test - name: Install Test
shell: bash shell: bash
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload Release Asset - name: Upload Release Asset
@@ -287,7 +287,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
tag_name=${{ github.ref_name }} 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 # Check if the file exists
if [ ! -f "$wheel_path" ]; then if [ ! -f "$wheel_path" ]; then
@@ -301,18 +301,18 @@ jobs:
- name: Apply auditwheel repair - name: Apply auditwheel repair
continue-on-error: true continue-on-error: true
run: | run: |
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
auditwheel repair \ auditwheel repair \
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \ --exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux ${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)) wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
- name: Test manylinux wheel - name: Test manylinux wheel
continue-on-error: true continue-on-error: true
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload manylinux wheel - name: Upload manylinux wheel
@@ -320,7 +320,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | 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 if [ ! -f "$wheel_path_manylinux" ]; then
echo "Error: Wheel file not found at $wheel_path_manylinux" echo "Error: Wheel file not found at $wheel_path_manylinux"
exit 1 exit 1
@@ -107,14 +107,14 @@ jobs:
run: | run: |
chmod +x build_linux.sh chmod +x build_linux.sh
./build_linux.sh ${{ inputs.flash-attn-version }} ${{ inputs.python-version }} ${{ inputs.torch-version }} ${{ inputs.cuda-version }} ./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)) wheel_path=$(ls flash-attention/dist/*.whl | head -n 1)
echo "WHEEL_NAME=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH=$wheel_path" >> $GITHUB_OUTPUT
- name: Install Test - name: Install Test
shell: bash shell: bash
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload Release Asset - name: Upload Release Asset
@@ -124,7 +124,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
tag_name=${{ github.ref_name }} 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 # Check if the file exists
if [ ! -f "$wheel_path" ]; then if [ ! -f "$wheel_path" ]; then
@@ -138,18 +138,18 @@ jobs:
- name: Apply auditwheel repair - name: Apply auditwheel repair
continue-on-error: true continue-on-error: true
run: | run: |
auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} auditwheel show ${{ steps.build_wheels.outputs.WHEEL_PATH }}
auditwheel repair \ auditwheel repair \
--exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \ --exclude libc10* --exclude libtorch* --exclude libcu* --exclude libnv* --exclude 'libtorch*' \
flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux ${{ steps.build_wheels.outputs.WHEEL_PATH }} -w flash-attention/dist_manylinux
wheel_name=$(basename $(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)) wheel_path_manylinux=$(ls flash-attention/dist_manylinux/*manylinux*.whl | head -n 1)
echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT echo "WHEEL_PATH_MANYLINUX=$wheel_path_manylinux" >> $GITHUB_OUTPUT
- name: Test manylinux wheel - name: Test manylinux wheel
continue-on-error: true continue-on-error: true
run: | run: |
pip uninstall -y flash-attn > /dev/null 2>&1 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__)" python -c "import flash_attn; print(flash_attn.__version__)"
- name: Upload manylinux wheel - name: Upload manylinux wheel
@@ -157,7 +157,7 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | 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 if [ ! -f "$wheel_path_manylinux" ]; then
echo "Error: Wheel file not found at $wheel_path_manylinux" echo "Error: Wheel file not found at $wheel_path_manylinux"
exit 1 exit 1
+37 -22
View File
@@ -90,19 +90,20 @@ LINUX_ARM64_MATRIX = {
LINUX_SELF_HOSTED_MATRIX = { LINUX_SELF_HOSTED_MATRIX = {
"flash-attn-version": [ "flash-attn-version": [
"2.7.4", "2.6.3",
"2.8.3", # "2.7.4",
# "2.8.3",
], ],
"python-version": [ "python-version": [
"3.10", # "3.10",
"3.11", # "3.11",
"3.12", # "3.12",
"3.13", # "3.13",
"3.14", "3.14",
], ],
"torch-version": ["2.9.1"], "torch-version": ["2.9.1"],
"cuda-version": [ "cuda-version": [
"12.8", # "12.8",
"13.0", "13.0",
], ],
} }
@@ -110,26 +111,27 @@ LINUX_SELF_HOSTED_MATRIX = {
LINUX_ARM64_SELF_HOSTED_MATRIX = { LINUX_ARM64_SELF_HOSTED_MATRIX = {
"flash-attn-version": [ "flash-attn-version": [
# "2.6.3", # "2.6.3",
"2.7.4", # "2.7.4",
# "2.8.3", "2.8.3",
], ],
"python-version": [ "python-version": [
"3.10", # "3.10",
"3.11", # "3.11",
"3.12", # "3.12",
# "3.13", # "3.13",
"3.14",
], ],
"torch-version": [ "torch-version": [
"2.5.1", # "2.5.1",
"2.6.0", # "2.6.0",
"2.7.1", # "2.7.1",
# "2.8.0", # "2.8.0",
"2.9.1", "2.9.1",
], ],
"cuda-version": [ "cuda-version": [
"12.4", # "12.4",
# "12.6", # "12.6",
"12.8", # "12.8",
# "12.9", # "12.9",
"13.0", "13.0",
], ],
@@ -164,10 +166,23 @@ WINDOWS_MATRIX = {
} }
WINDOWS_CODEBUILD_MATRIX = { WINDOWS_CODEBUILD_MATRIX = {
"flash-attn-version": ["2.6.3", "2.7.4.post1", "2.8.3"], "flash-attn-version": [
"python-version": ["3.10", "3.11", "3.12", "3.13"], "2.6.3",
"torch-version": ["2.9.1"], "2.7.4.post1",
"cuda-version": ["13.0"], "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_self_hosted": LINUX_SELF_HOSTED_MATRIX,
# #
# "linux_arm64_self_hosted": False, # "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": False,
# "windows": WINDOWS_MATRIX, # "windows": WINDOWS_MATRIX,