Files
flash-attention-prebuild-wh…/.github/workflows/test-code-build.yml
T
2025-08-08 18:07:35 +09:00

66 lines
2.0 KiB
YAML

name: "Test Code build"
on:
workflow_dispatch:
jobs:
build_wheels:
name: Build wheels and Upload
timeout-minutes: 3600
# runs-on: windows-latest
runs-on: codebuild-flash-attention-pre-build-wheel-windows-${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
- name: Enable Git long paths
shell: pwsh
run: git config --system core.longpaths true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: Jimver/cuda-toolkit@v0.2.24
with:
cuda: "12.8.1"
method: "network"
use-github-cache: false
use-local-cache: false
- name: Install VisualStudio BuildTools
shell: pwsh
timeout-minutes: 1200
run: |
choco install -y visualstudio2022buildtools `
--version=117.14.1 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended --includeOptional"
- name: Install CMake
shell: pwsh
run: |
choco install -y cmake
- name: Install Windows Sdk
shell: pwsh
run: |
choco install -y windows-sdk-10.1
- name: Install build dependencies
shell: pwsh
run: |
pip install -U pip setuptools==75.8.0 wheel setuptools packaging psutil ninja numpy
- name: Build wheels
timeout-minutes: 1200
shell: pwsh
env:
MAX_JOBS: 4
NVCC_THREADS: 2
run: |
.\build_windows.ps1 -FlashAttnVersion "2.7.4" -PythonVersion "3.11" -TorchVersion "2.7.1" -CudaVersion "12.8.1"
$wheelName = Get-ChildItem -Path "flash-attention\dist\*.whl" | Select-Object -First 1 | ForEach-Object { $_.Name }
echo "wheel_name=$wheelName" >> $env:GITHUB_ENV
- name: Install Test
shell: pwsh
run: |
pip install flash-attention/dist/$env:wheel_name
python -c "import flash_attn; print(flash_attn.__version__)"