diff --git a/.github/workflows/_build_linux.yml b/.github/workflows/_build_linux.yml index 41aaf54..5c609e5 100644 --- a/.github/workflows/_build_linux.yml +++ b/.github/workflows/_build_linux.yml @@ -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 diff --git a/.github/workflows/_build_linux_arm_self_host.yml b/.github/workflows/_build_linux_arm_self_host.yml index 00a197b..1f4d159 100644 --- a/.github/workflows/_build_linux_arm_self_host.yml +++ b/.github/workflows/_build_linux_arm_self_host.yml @@ -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 diff --git a/.github/workflows/_build_linux_self_host.yml b/.github/workflows/_build_linux_self_host.yml index 6ad2f42..cd9c07c 100644 --- a/.github/workflows/_build_linux_self_host.yml +++ b/.github/workflows/_build_linux_self_host.yml @@ -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 diff --git a/.github/workflows/_build_linux_self_host_manylinux.yml b/.github/workflows/_build_linux_self_host_manylinux.yml index 21ae3c0..4cb311b 100644 --- a/.github/workflows/_build_linux_self_host_manylinux.yml +++ b/.github/workflows/_build_linux_self_host_manylinux.yml @@ -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 diff --git a/create_matrix.py b/create_matrix.py index 4447459..c8e8154 100644 --- a/create_matrix.py +++ b/create_matrix.py @@ -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,