Skip to content

Commit 2bff317

Browse files
authored
Merge branch 'main' into amyachev/issue2736
2 parents 04d3349 + 9c6817d commit 2bff317

File tree

501 files changed

+18972
-14633
lines changed

Some content is hidden

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

501 files changed

+18972
-14633
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: setup-pyenv-python
2+
description: Setup Python via pyenv
3+
inputs:
4+
python-version:
5+
description: Python version to setup
6+
pyenv-version:
7+
description: Pyenv version to setup
8+
default: "v2.4.19"
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Clone pyenv
13+
uses: actions/checkout@v4
14+
with:
15+
repository: "pyenv/pyenv"
16+
ref: ${{ inputs.pyenv-version }}
17+
path: pyenv
18+
19+
- name: Setup environment variables
20+
shell: bash
21+
run: |
22+
echo PATH="${PWD}/pyenv/bin:${PATH}" >> "${GITHUB_ENV}"
23+
echo PYENV_ROOT="${PWD}/pyenv" >> "${GITHUB_ENV}"
24+
25+
- name: Setup pyenv into profile
26+
shell: bash
27+
run: |
28+
eval "$(pyenv init -)" >> ~/.profile
29+
30+
- name: Install required packages
31+
shell: bash
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libncurses5-dev libbz2-dev libreadline-dev libsqlite3-dev libssl-dev zlib1g-dev liblzma-dev
35+
36+
- name: Setup Python
37+
shell: bash
38+
run: |
39+
set -x
40+
pyenv install ${{ inputs.python-version }}
41+
pyenv global ${{ inputs.python-version }}
42+
echo PATH="$(dirname $(pyenv which python${{ inputs.python-version }})):$PATH" >> ${GITHUB_ENV}
43+
44+
- name: Use python as python3
45+
shell: bash
46+
run: |
47+
set -x
48+
ls -l ~/.local/bin/
49+
ln -sf $(which pip${{ inputs.python-version }}) ~/.local/bin/pip
50+
ln -sf $(which python${{ inputs.python-version }}) ~/.local/bin/python
51+
ln -sf $(which pip${{ inputs.python-version }}) ~/.local/bin/pip3
52+
ln -sf $(which python${{ inputs.python-version }}) ~/.local/bin/python3

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ runs:
8383
uses: ./.github/actions/load
8484
env:
8585
# Increase this value to reset cache
86-
CACHE_NUMBER: 12
86+
CACHE_NUMBER: 14
8787
with:
8888
path: pytorch
8989
key: pytorch-$PYTORCH_CACHE_KEY-$CACHE_NUMBER
@@ -120,7 +120,7 @@ runs:
120120
cd pytorch
121121
pip install wheel
122122
pip install -r requirements.txt
123-
python setup.py bdist_wheel
123+
USE_STATIC_MKL=1 CFLAGS="-Wno-error=maybe-uninitialized" python setup.py bdist_wheel
124124
125125
- name: Install PyTorch (built from source)
126126
if: ${{ inputs.mode == 'source' }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
default: false
99
command:
1010
description: Command to execute
11-
default: DEBUG=1 pip install --no-build-isolation '.[build,tests,tutorials]'
11+
default: DEBUG=1 pip install -v --no-build-isolation '.[build,tests,tutorials]'
1212
runs:
1313
using: "composite"
1414
steps:

.github/pins/ipex.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cd132db4e11fbf799a2d3ed2afea100a4afd4efd
1+
15ef7db18b0a50101b41d9c78780d35ea7937ffc

.github/pins/pytorch-upstream.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ae7f809bfcadb426f8024a8abf3f33f0ecfd5308
1+
d0fd42eb3ac6939e63879bc055b6901103f713d3

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ on:
3939
description: Ignore pytest.skip
4040
type: boolean
4141
default: false
42-
use_system_python:
43-
description: Use system Python
42+
use_pyenv_python:
43+
description: Use Python built with pyenv
4444
type: boolean
4545
default: false
4646

@@ -64,4 +64,4 @@ jobs:
6464
skip_list: ${{ inputs.skip_list }}
6565
run_name: ${{ inputs.run_name || format('Build and test {0}', inputs.runner_label) }}
6666
enable_unskip: ${{ inputs.enable_unskip }}
67-
use_system_python: ${{ inputs.use_system_python || false }}
67+
use_pyenv_python: ${{ inputs.use_pyenv_python || false }}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ on:
3232
description: Ignore pytest.skip
3333
type: boolean
3434
default: false
35+
use_pyenv_python:
36+
description: Use Python built with pyenv
37+
type: boolean
38+
default: false
3539

3640
permissions: read-all
3741

@@ -79,3 +83,4 @@ jobs:
7983
skip_list: ${{ inputs.skip_list }}
8084
run_name: ${{ inputs.run_name }}
8185
enable_unskip: ${{ inputs.enable_unskip }}
86+
use_pyenv_python: ${{ inputs.use_pyenv_python || false }}

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ on:
5656
description: Runner label for version
5757
type: string
5858
default: runner-0.0.20
59-
use_system_python:
60-
description: Use system Python
59+
use_pyenv_python:
60+
description: Use Python built with pyenv
6161
type: boolean
6262
default: false
6363

@@ -94,12 +94,18 @@ jobs:
9494
path: $HOME/.cache/pip
9595
key: pip-${{ inputs.python_version }}-${{ hashFiles('python/pyproject.toml', 'python/setup.py') }}-${{ env.CACHE_NUMBER }}
9696

97-
- name: Install Python ${{ inputs.python_version }}
98-
if: ${{ !inputs.use_system_python }}
97+
- name: Install Python (using actions/setup-python) ${{ inputs.python_version }}
98+
if: ${{ !inputs.use_pyenv_python }}
9999
uses: actions/setup-python@v5
100100
with:
101101
python-version: ${{ inputs.python_version }}
102102

103+
- name: Install Python (from pyenv) ${{ inputs.python_version }}
104+
if: ${{ inputs.use_pyenv_python }}
105+
uses: ./.github/actions/setup-pyenv-python
106+
with:
107+
python-version: ${{ inputs.python_version }}
108+
103109
- name: Identify Python version
104110
run: |
105111
PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info[0]}.{ sys.version_info[1]}")')"
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build on Windows
2+
3+
on:
4+
workflow_dispatch:
5+
6+
pull_request:
7+
branches:
8+
- main
9+
- release/**
10+
push:
11+
branches:
12+
- main
13+
- release/**
14+
15+
permissions: read-all
16+
17+
env:
18+
NEW_WORKSPACE: C:\gh${{ github.run_id }}
19+
20+
jobs:
21+
build:
22+
name: Build
23+
runs-on: avc336
24+
steps:
25+
- name: Enable long paths
26+
run: |
27+
git config --system core.longPaths true
28+
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Install Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.9'
36+
37+
# Copy workspace to a temporary location with a shorter name.
38+
- name: Copy workspace
39+
run: |
40+
Copy-Item -Path ${{ github.workspace }} -Destination ${{ env.NEW_WORKSPACE }} -Recurse
41+
42+
# We need ninja >= 1.12.0 to support long names on Windows. At the moment there is no required
43+
# version in pypi, so instead of installing ninja with pip we use a preinstalled 1.12.1 on the
44+
# runner.
45+
- name: Build Triton
46+
run: |
47+
cd ${{ env.NEW_WORKSPACE }}
48+
cd python
49+
pip install -U wheel pybind11 certifi cython cmake setuptools>=65.6.1
50+
python -m certifi
51+
pip install -v --no-build-isolation '.[build]'
52+
53+
- name: Clean
54+
if: ${{ always() }}
55+
run: |
56+
Remove-Item -LiteralPath ${{ env.NEW_WORKSPACE }} -Force -Recurse -ErrorAction Ignore

.github/workflows/build-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@ on:
3939
description: Ignore pytest.skip
4040
type: boolean
4141
default: false
42+
use_pyenv_python:
43+
description: Use Python built with pyenv
44+
type: boolean
45+
default: false
4246

4347
pull_request:
4448
branches:
4549
- main
50+
- release/**
4651
push:
4752
branches:
4853
- main
54+
- release/**
4955

5056
permissions: read-all
5157

@@ -128,3 +134,4 @@ jobs:
128134
skip_list: ${{ inputs.skip_list }}
129135
run_name: ${{ inputs.run_name }}
130136
enable_unskip: ${{ inputs.enable_unskip || false }}
137+
use_pyenv_python: ${{ inputs.use_pyenv_python || false }}

0 commit comments

Comments
 (0)