mirror of
https://github.com/BillyOutlast/flash-attention-prebuild-wheels-rocm.git
synced 2026-07-01 01:17:55 -04:00
df03c553f7
- Create .github/actions/build-and-upload composite action for shared build logic - Consolidate Python/uv setup, CUDA setup, wheel building, testing, and upload steps - Update _build_linux.yml to use new composite action (reduced from 136 to 69 lines) - Update _build_linux_arm_self_host.yml to use composite action with cleanup enabled - Update _build_linux_self_host.yml for both container and no-container jobs - Update _build_manylinux_self_host.yml to use composite action - Reduce code duplication by ~200+ lines across all workflow files
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
# #########################################################
|
|
# Build wheels with GitHub-hosted runner
|
|
# #########################################################
|
|
|
|
name: "[Linux] Build wheels and upload to GitHub Releases"
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
flash-attn-version:
|
|
description: "Flash-Attention version"
|
|
required: true
|
|
type: string
|
|
python-version:
|
|
description: "Python version"
|
|
required: true
|
|
type: string
|
|
torch-version:
|
|
description: "PyTorch version"
|
|
required: true
|
|
type: string
|
|
cuda-version:
|
|
description: "CUDA version"
|
|
required: true
|
|
type: string
|
|
runner:
|
|
description: "Runner type"
|
|
required: false
|
|
type: string
|
|
default: "ubuntu-22.04"
|
|
is-upload:
|
|
description: "Whether to upload the release asset"
|
|
required: false
|
|
type: boolean
|
|
default: true
|
|
|
|
jobs:
|
|
build_wheels:
|
|
name: Build wheels and Upload (Linux x86_64, GitHub hosted runner)
|
|
runs-on: ${{ inputs.runner }}
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
TERM: xterm-256color
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Maximize build space
|
|
run: |
|
|
df -h
|
|
echo "-----------------------------"
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /usr/local/lib/android
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf /opt/hostedtoolcache/CodeQL
|
|
df -h
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt install -y ninja-build clang time patchelf
|
|
|
|
- name: Build and upload wheels
|
|
uses: ./.github/actions/build-and-upload
|
|
with:
|
|
flash-attn-version: ${{ inputs.flash-attn-version }}
|
|
python-version: ${{ inputs.python-version }}
|
|
torch-version: ${{ inputs.torch-version }}
|
|
cuda-version: ${{ inputs.cuda-version }}
|
|
is-upload: ${{ inputs.is-upload }}
|