Skip to content

Add triton 3.13t builds - DO NOT Merge #18

Add triton 3.13t builds - DO NOT Merge

Add triton 3.13t builds - DO NOT Merge #18

Workflow file for this run

name: Wheels Build manylinux2014_x86_64
on:
workflow_dispatch:
schedule:
- cron: "20 2 * * *"
pull_request:
paths:
- .github/workflows/wheels_v2.yml
jobs:
Build-Wheels:
timeout-minutes: 90
runs-on: [self-hosted, CPU]
permissions:
id-token: write
contents: read
steps:
- name: Prune stale docker containers
run: |
# If cibuildwheel crashes (or, say, is OOM-killed), it leaves behind a
# docker container. Eventually these consume all the disk space on
# this machine.
docker container prune -f
- name: Checkout
uses: actions/checkout@v3
# The LATEST_DATE here should be kept in sync with the one in Patch setup.py
- id: check-version
name: Check latest version
run: |
export PACKAGE_DATE=$(python3 -m pip install --user --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ --dry-run triton-nightly== |& grep -oP '(?<=, )[0-9\.]+dev[0-9]+(?=\))' | grep -oP '(?<=dev)[0-9]+')
export LATEST_DATE=$(TZ=UTC0 git show --quiet --date='format-local:%Y%m%d%H%M%S' --format="%cd")
if cmp -s <(echo $PACKAGE_DATE) <(echo $LATEST_DATE); then
echo "new_commit=false" >> "$GITHUB_OUTPUT"
else
echo "new_commit=true" >> "$GITHUB_OUTPUT"
fi
- name: Patch setup.py
if: ${{ steps.check-version.outputs.new_commit == 'true' }}
run: |
echo "" >> python/setup.cfg
echo "[build_ext]" >> python/setup.cfg
echo "base-dir=/project" >> python/setup.cfg
- name: Build wheels
if: ${{ steps.check-version.outputs.new_commit == 'true' }}
run: |
python3 -m pip install cibuildwheel --upgrade --user
export LATEST_DATE=$(TZ=UTC0 git show --quiet --date='format-local:%Y%m%d%H%M%S' --format="%cd")
# Pass MAX_JOBS=4 because, at time of writing, the VM "only" has 32GB
# of RAM and OOMs while building if we give it the default number of
# workers (2 * NUM_CPUs).
#
# Sadly, I couldn't make TRITON_BUILD_WITH_CLANG_LLD=1 work. The
# manylinux image has a relatively recent gcc (v10, released 2020),
# but its clang is ancient, v3.4, released in 2014 (!). I tried
# installing the prebuilt clang 10 binary distributed by LLVM, and I
# quickly ran into Linux DLL hell. I give up, for now. Perhaps
# manylinux_x_y will save us; I didn't try.
export CIBW_ENVIRONMENT="MAX_JOBS=4 TRITON_WHEEL_NAME=triton"
export CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux2014_x86_64:latest"
#export CIBW_MANYLINUX_PYPY_X86_64_IMAGE="quay.io/pypa/manylinux2014_x86_64:latest"
export CIBW_BEFORE_BUILD="pip install cmake;"
export CIBW_SKIP="cp{35,36,37,38}-*"
export CIBW_BUILD="cp3{9,10,11,12,13,13t}-manylinux_x86_64"
export CIBW_FREE_THREADED_SUPPORT=1
python3 -m cibuildwheel python --output-dir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-manylinux2014-wheels-upload
path: ./wheelhouse/*.whl
- name: Upload wheels to PyPI
if: false # Disable Upload to PyPI until ready for release
run: |
python3 -m twine upload wheelhouse/* -u __token__ -p ${{ secrets.PYPY_API_TOKEN }}