Skip to content

Commit 2d96f8c

Browse files
authored
Merge branch 'main' into fix/try-disabling-fp64-patch
2 parents 3e627e0 + 6b8ee6d commit 2d96f8c

File tree

396 files changed

+18217
-6957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

396 files changed

+18217
-6957
lines changed

.github/WINDOWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ python -c 'import torch;print(torch.__version__)'
157157
Install build dependencies:
158158

159159
```
160-
pip install -U wheel pybind11 cython cmake 'setuptools>=65.6.1'
160+
pip install -U wheel pybind11 cython cmake
161161
```
162162

163163
Build and install Triton:
164164

165165
```
166166
cd python
167-
pip install -v --no-build-isolation '.[build,tests,tutorials]'
167+
pip install -v '.[build,tests,tutorials]'
168168
cd ..
169169
```
170170

.github/actions/setup-pytorch/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ runs:
8888
uses: ./.github/actions/load
8989
env:
9090
# Increase this value to reset cache
91-
CACHE_NUMBER: 15
91+
CACHE_NUMBER: 16
9292
with:
9393
path: pytorch
9494
key: pytorch-$PYTORCH_CACHE_KEY-$CACHE_NUMBER
@@ -128,8 +128,11 @@ runs:
128128
129129
cd pytorch
130130
pip install wheel
131+
# FIXME: Compatibility with versions of CMake older than 3.5 has been removed, this brakes compilation of third_party/protobuf:
132+
# CMake Error at third_party/protobuf/cmake/CMakeLists.txt:2 (cmake_minimum_required)
133+
pip install 'cmake<4.0.0'
131134
pip install -r requirements.txt
132-
USE_STATIC_MKL=1 CFLAGS="-Wno-error=maybe-uninitialized" python setup.py bdist_wheel 2>&1 | grep -v \
135+
USE_XCCL=1 USE_STATIC_MKL=1 CFLAGS="-Wno-error=maybe-uninitialized" python setup.py bdist_wheel 2>&1 | grep -v \
133136
"Double arithmetic operation is not supported on this platform with FP64 conversion emulation mode (poison FP64 kernels is enabled)." | grep -v '^$'
134137
135138
- name: Install PyTorch (built from source)

.github/actions/setup-triton/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inputs:
1313
default: "false"
1414
command:
1515
description: Command to execute
16-
default: DEBUG=1 pip install -v --no-build-isolation '.[build,tests,tutorials]'
16+
default: DEBUG=1 pip install -v '.[build,tests,tutorials]'
1717
runs:
1818
using: "composite"
1919
steps:

.github/workflows/build-test-reusable.yml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ env:
7474
jobs:
7575
integration-tests:
7676
name: Integration tests
77+
timeout-minutes: 720
7778
runs-on: ${{ fromJson(inputs.runner_label && format('["linux", "{0}"]', inputs.runner_label) || format('["linux", "{0}", "{1}", "{2}"]', inputs.device, inputs.driver_version, inputs.runner_version)) }}
7879
defaults:
7980
run:
@@ -131,27 +132,53 @@ jobs:
131132
build_llvm: ${{ inputs.build_llvm }}
132133
use_spirv_backend: ${{ inputs.use_spirv_backend }}
133134

135+
- name: Report environment details
136+
run: |
137+
source ./scripts/capture-hw-details.sh --quiet
138+
cat <<EOF | tee .env
139+
TIMESTAMP=$(date '+%Y%m%d%H%M%S')
140+
GITHUB_RUN_ID=$GITHUB_RUN_ID
141+
GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER
142+
GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT
143+
PYTHON_VERSION=${{ inputs.python_version }}
144+
PYTORCH_REPO=$PYTORCH_REPO
145+
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
146+
PYTORCH_VERSION=$PYTORCH_VERSION
147+
TRITON_REPO=$GITHUB_REPOSITORY
148+
LIBIGC1_VERSION=$LIBIGC1_VERSION
149+
LEVEL_ZERO_VERSION=$LEVEL_ZERO_VERSION
150+
GPU_DEVICE=$GPU_DEVICE
151+
AGAMA_VERSION=$AGAMA_VERSION
152+
EOF
153+
134154
- name: Create test-triton command line
135155
run: |
156+
skiplist="$GITHUB_WORKSPACE/scripts/skiplist/default"
157+
136158
if [[ -n "${{ inputs.skip_list }}" ]]; then
137159
skiplist="$GITHUB_WORKSPACE/scripts/skiplist/${{ inputs.skip_list }}"
138160
elif [[ -n "${{ inputs.driver_version }}" ]]; then
139161
skiplist="$GITHUB_WORKSPACE/scripts/skiplist/${{ inputs.driver_version }}"
140-
else
141-
skiplist="$GITHUB_WORKSPACE/scripts/skiplist/default"
142162
fi
143163
144164
if [ -d "$skiplist" ]; then
145165
skiplist="--skip-list $skiplist"
146166
else
147-
skiplist=
167+
skiplist="--skip-list $GITHUB_WORKSPACE/scripts/skiplist/default"
148168
fi
149169
150170
{
151171
echo SKIPLIST="$skiplist"
152172
echo TRITON_TEST_CMD="bash -v -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist"
153173
} | tee -a $GITHUB_ENV
154174
175+
- name: Run Proton tests
176+
if: ${{ inputs.driver_version == 'rolling' }}
177+
run: |
178+
cd third_party/proton/test
179+
pytest test_api.py test_lib.py test_profile.py test_viewer.py -s -v
180+
cd ..
181+
155182
- name: Run unit tests
156183
run: |
157184
${{ env.TRITON_TEST_CMD }} --unit
@@ -204,25 +231,6 @@ jobs:
204231
python scripts/pass_rate.py --reports reports --json ${{ env.SKIPLIST }} > pass_rate.json
205232
python scripts/pass_rate.py --reports reports --suite tutorials --json ${{ env.SKIPLIST }} > pass_rate_tutorials.json
206233
207-
- name: Report environment details
208-
run: |
209-
source ./scripts/capture-hw-details.sh --quiet
210-
cat <<EOF | tee .env
211-
TIMESTAMP=$(date '+%Y%m%d%H%M%S')
212-
GITHUB_RUN_ID=$GITHUB_RUN_ID
213-
GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER
214-
GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT
215-
PYTHON_VERSION=${{ inputs.python_version }}
216-
PYTORCH_REPO=$PYTORCH_REPO
217-
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
218-
PYTORCH_VERSION=$PYTORCH_VERSION
219-
TRITON_REPO=$GITHUB_REPOSITORY
220-
LIBIGC1_VERSION=$LIBIGC1_VERSION
221-
LEVEL_ZERO_VERSION=$LEVEL_ZERO_VERSION
222-
GPU_DEVICE=$GPU_DEVICE
223-
AGAMA_VERSION=$AGAMA_VERSION
224-
EOF
225-
226234
- name: Upload pass rate report
227235
# upload reports only for the default branch
228236
if: github.ref_name == 'main'

.github/workflows/build-test-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ jobs:
9191
Invoke-BatchFile "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
9292
cd ${{ env.NEW_WORKSPACE }}
9393
cd python
94-
pip install -U wheel pybind11 cython cmake 'setuptools>=65.6.1'
95-
pip install -v --no-build-isolation '.[build,tests,tutorials]'
94+
pip install -U wheel pybind11 cython cmake
95+
pip install -v '.[build,tests,tutorials]'
9696
9797
- name: Triton version
9898
run: |

.github/workflows/build-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
Invoke-BatchFile "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
5959
cd ${{ env.NEW_WORKSPACE }}
6060
cd python
61-
pip install -U wheel pybind11 cython cmake 'setuptools>=65.6.1'
62-
pip install -v --no-build-isolation '.[build]'
61+
pip install -U wheel pybind11 cython cmake
62+
pip install -v '.[build]'
6363
6464
- name: Clean
6565
if: ${{ always() }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
tags:
9+
# Final Release tags look like: v1.11.0
10+
- v[0-9]+.[0-9]+.[0-9]+
11+
# Release candidate tags look like: v1.11.0-rc1
12+
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
13+
release:
14+
types: [published]
15+
pull_request:
16+
paths: [.github/workflows/create_release.yml]
17+
18+
jobs:
19+
20+
release:
21+
if: ${{ github.repository == 'triton-lang/triton' }}
22+
name: Create Release
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: write
26+
outputs:
27+
release_name: "${{ steps.release_name.outputs.name }}"
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
show-progress: false
32+
submodules: 'recursive'
33+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
34+
- name: Fake name for PRs
35+
if: ${{ github.event_name == 'pull_request' }}
36+
run: echo "PT_GITHUB_REF=refs/tags/pr-tag" >> "$GITHUB_ENV"
37+
- name: Real name for non-PRs
38+
if: ${{ github.event_name != 'pull_request' }}
39+
run: echo "PT_GITHUB_REF=$GITHUB_REF" >> "$GITHUB_ENV"
40+
- name: Set filenames
41+
run: |
42+
tag_or_branch="${PT_GITHUB_REF#refs/tags/}"
43+
tag_or_branch="${tag_or_branch#refs/heads/}"
44+
# replace directory separators with _ in branch name
45+
tag_or_branch="${tag_or_branch//\//_}"
46+
echo "RELEASE_NAME=triton-$tag_or_branch" >> "$GITHUB_ENV"
47+
echo "RELEASE_FILE=triton-$tag_or_branch.tar.gz" >> "$GITHUB_ENV"
48+
- name: Create source distribution
49+
run: |
50+
# Create new folder with specified name so extracting the archive yields that
51+
rm -rf "/tmp/$RELEASE_NAME"
52+
cp -r "$PWD" "/tmp/$RELEASE_NAME"
53+
mv "/tmp/$RELEASE_NAME" .
54+
# Cleanup
55+
find "$RELEASE_NAME" -name '.git*' -exec rm -rv {} \; || true
56+
# Create archive
57+
tar -czf "$RELEASE_FILE" "$RELEASE_NAME"
58+
echo "Created source archive $RELEASE_FILE with content: $(ls -a "$RELEASE_NAME")"
59+
- name: Upload source distribution for release
60+
if: ${{ github.event_name == 'release' }}
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
files: ${{env.RELEASE_FILE}}
64+
- name: Upload source distribution to GHA artifacts for release tags
65+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'rc') }}
66+
uses: actions/[email protected]
67+
with:
68+
name: ${{ env.RELEASE_FILE }}
69+
path: ${{ env.RELEASE_FILE }}
70+
- name: Set output
71+
id: release_name
72+
run: echo "name=release_name::${{ env.RELEASE_NAME }}.tar.gz" >> "${GITHUB_OUTPUT}"
73+
74+
concurrency:
75+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name }}
76+
cancel-in-progress: true

.github/workflows/inductor-tests-reusable.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,24 +70,8 @@ jobs:
7070
7171
- name: Run inductor tests
7272
run: |
73-
cd pytorch
74-
pip install -r .ci/docker/requirements-ci.txt
75-
7673
export PYTORCH_TESTING_DEVICE_ONLY_FOR="xpu"
77-
78-
test_cmd="python test/run_test.py --keep-going --include "
79-
if [[ "${{ inputs.suite }}" = "all" ]]; then
80-
for test in $(ls test/inductor | grep test);
81-
do
82-
test_cmd="${test_cmd} inductor/$test"
83-
done
84-
else
85-
for test in ${{ inputs.suite }};
86-
do
87-
test_cmd="${test_cmd} $test"
88-
done
89-
fi
90-
eval $test_cmd
74+
bash scripts/test-pytorch.sh ${{ inputs.suite }}
9175
9276
- name: Report environment details
9377
if: always()

0 commit comments

Comments
 (0)