Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Build Triton wheel

Build Triton wheel #34

Workflow file for this run

name: Build Triton wheel
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
repository: ${{ github.event.inputs.repository }}
- name: Resolve SOURCE_DATE_EPOCH
id: source-date-epoch
run: |
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" | tee $GITHUB_OUTPUT
- name: Apply patches
run: |
set -e
# List of patches
patches=(
"https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/patches/triton/0000-add-support-for-conversion-fp16-to-fp32.patch"
"https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/patches/triton/0000-fix-max-ptx-version.patch"
)
# Apply patches
for patch in ${patches[@]}; do
echo "Applying patch $patch"
curl "$patch" | patch -p1
done
- name: Build wheels
uses: pypa/cibuildwheel@v2.18.0
with:
package-dir: python
env:
CIBW_BUILD: cp${{ matrix.python_version }}-manylinux_x86_64
CIBW_ENVIRONMENT: CMAKE_BUILD_TYPE=Release
SOURCE_DATE_EPOCH: ${{ steps.source-date-epoch.outputs.SOURCE_DATE_EPOCH }}
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: wheelhouse/*.whl
prerelease: true
tag_name: ${{ github.event.inputs.tag_name }}
strategy:
matrix:
python_version: [37, 38, 39, 310, 311, 312]
on:
workflow_dispatch:
inputs:
repository:
default: triton-lang/triton
description: Source repository
required: true
type: string
ref:
default: release/2.3.x
description: Source ref
required: true
type: string
tag_name:
description: Target tag
required: true
type: string