Skip to content
Merged
Show file tree
Hide file tree
Changes from 124 commits
Commits
Show all changes
208 commits
Select commit Hold shift + click to select a range
d3f32fa
modify build
mengfei25 Jul 16, 2025
bdc58d7
modify ut
mengfei25 Jul 16, 2025
b07b490
modify e2e
mengfei25 Jul 16, 2025
7b4582b
update
mengfei25 Jul 16, 2025
3ae4b09
update
mengfei25 Jul 16, 2025
fe06ca3
update
mengfei25 Jul 16, 2025
be531f7
Update nightly_ondemand.yml
mengfei25 Jul 16, 2025
1df6138
update
mengfei25 Jul 17, 2025
9fe4dcb
update
mengfei25 Jul 17, 2025
ef91984
update
mengfei25 Jul 17, 2025
01fbe46
update
mengfei25 Jul 17, 2025
191b5c0
update
mengfei25 Jul 17, 2025
f313b85
update
mengfei25 Jul 18, 2025
7d4488b
update
mengfei25 Jul 18, 2025
66e28da
update
mengfei25 Jul 18, 2025
8b22418
update
mengfei25 Jul 18, 2025
acf94d1
update
mengfei25 Jul 18, 2025
a6fa7da
update
mengfei25 Jul 18, 2025
053bed3
update
mengfei25 Jul 18, 2025
7ee8d4b
update
mengfei25 Jul 18, 2025
428e483
update
mengfei25 Jul 18, 2025
c483968
update
mengfei25 Jul 18, 2025
32474f8
update
mengfei25 Jul 18, 2025
5976099
update
mengfei25 Jul 18, 2025
28e53b2
update
mengfei25 Jul 18, 2025
2e9921e
update
mengfei25 Jul 18, 2025
b058b1a
update
mengfei25 Jul 18, 2025
93e5444
update
mengfei25 Jul 18, 2025
2aa5b11
Merge branch 'main' into mengfeil/containerd
mengfei25 Jul 18, 2025
8baec84
update
mengfei25 Jul 18, 2025
95709b9
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
mengfei25 Jul 18, 2025
d4c78aa
update
mengfei25 Jul 18, 2025
a8154f1
update
mengfei25 Jul 18, 2025
f25ecfe
update
mengfei25 Jul 18, 2025
e06e1bd
update
mengfei25 Jul 18, 2025
c437f29
update
mengfei25 Jul 18, 2025
0ae0bb1
update
mengfei25 Jul 18, 2025
d4da95d
update
mengfei25 Jul 18, 2025
db17d7d
update
mengfei25 Jul 18, 2025
b9c247a
update
mengfei25 Jul 18, 2025
a7d76ae
Merge branch 'main' into mengfeil/containerd
mengfei25 Jul 18, 2025
9ae98ea
update
mengfei25 Jul 18, 2025
c06f1ee
update
mengfei25 Jul 18, 2025
6e14f8b
update
mengfei25 Jul 21, 2025
9a621c5
update
mengfei25 Jul 21, 2025
bb17bab
update
mengfei25 Jul 21, 2025
981c744
update
mengfei25 Jul 21, 2025
6482077
update
mengfei25 Jul 21, 2025
ec0c1f2
update
mengfei25 Jul 21, 2025
1cc986e
update
mengfei25 Jul 21, 2025
b2b48c5
update
mengfei25 Jul 21, 2025
bccec93
update
mengfei25 Jul 21, 2025
9f604a7
update
mengfei25 Jul 21, 2025
8a78c7c
update
mengfei25 Jul 22, 2025
46d00c8
update
mengfei25 Jul 22, 2025
e3949d8
update
mengfei25 Jul 22, 2025
3f69213
update
mengfei25 Jul 22, 2025
e8b015a
update
mengfei25 Jul 22, 2025
bbd82cd
update
mengfei25 Jul 22, 2025
c144bab
get runner
mengfei25 Jul 22, 2025
40180c0
test env
mengfei25 Jul 22, 2025
54ea2f0
update
mengfei25 Jul 22, 2025
9b660b9
Revert "update"
mengfei25 Jul 22, 2025
7d025c0
update
mengfei25 Jul 22, 2025
dd23ceb
update
mengfei25 Jul 22, 2025
f21e4c9
Merge branch 'main' into mengfeil/containerd
mengfei25 Jul 22, 2025
de4a432
update
mengfei25 Jul 22, 2025
517c324
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
mengfei25 Jul 22, 2025
65cc01a
remove useless inputs for op benchmark
mengfei25 Jul 22, 2025
f727ef8
checkout torch-xpu-ops
mengfei25 Jul 22, 2025
18ada97
modify get runner
mengfei25 Jul 22, 2025
018f968
modify build
mengfei25 Jul 22, 2025
93fa112
modify build
mengfei25 Jul 23, 2025
ad8cc67
update
mengfei25 Jul 23, 2025
de0f557
Merge branch 'main' into mengfeil/containerd
mengfei25 Jul 23, 2025
7c9d3a3
update
mengfei25 Jul 23, 2025
2fc3b8e
update
mengfei25 Jul 23, 2025
78cedbf
update
mengfei25 Jul 23, 2025
c6bc928
update
mengfei25 Jul 23, 2025
9765fac
update
mengfei25 Jul 23, 2025
eda9634
modify ut
mengfei25 Jul 23, 2025
ec697f5
modify build
mengfei25 Jul 23, 2025
c1e4ca7
modify build
mengfei25 Jul 23, 2025
50e40fe
modify build
mengfei25 Jul 24, 2025
6173798
Merge branch 'main' into mengfeil/containerd
mengfei25 Jul 24, 2025
b3f6f0e
update
mengfei25 Jul 24, 2025
5848944
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
mengfei25 Jul 24, 2025
42da693
modify build
mengfei25 Jul 24, 2025
26b56db
modify build
mengfei25 Jul 24, 2025
77d8172
modify build
mengfei25 Jul 24, 2025
e9d551a
update
mengfei25 Jul 24, 2025
9649dfd
update
mengfei25 Jul 24, 2025
84a5132
update
mengfei25 Jul 24, 2025
ee18a1c
update
mengfei25 Jul 24, 2025
43fee42
update
mengfei25 Jul 24, 2025
e8f1c0d
update
mengfei25 Jul 24, 2025
517b081
update
mengfei25 Jul 25, 2025
ddecdf9
update
mengfei25 Jul 25, 2025
d1bf4cf
modify ut
mengfei25 Jul 25, 2025
d99668c
update
mengfei25 Jul 25, 2025
d0d1ceb
update
mengfei25 Jul 25, 2025
1f26538
update
mengfei25 Jul 25, 2025
d06b8db
update
mengfei25 Jul 25, 2025
70577e1
update
mengfei25 Jul 25, 2025
2467e9e
update
mengfei25 Jul 25, 2025
96ff039
update
mengfei25 Jul 25, 2025
da12ea0
update
mengfei25 Jul 25, 2025
4f6ecfd
modify ut
mengfei25 Jul 25, 2025
ba97507
modify ut
mengfei25 Jul 25, 2025
9896441
fix pip warnings
mengfei25 Jul 25, 2025
50467ee
modify ut logs path
mengfei25 Jul 25, 2025
5c62bc9
modify ut logs path
mengfei25 Jul 25, 2025
8b33c21
set run name for nightly and on-demand tests
mengfei25 Jul 25, 2025
f08c528
modify ut logs path
mengfei25 Jul 25, 2025
55bd5dc
ut summray always
mengfei25 Jul 25, 2025
dbd3a27
fix ut logs path
mengfei25 Jul 25, 2025
2e7680d
fix e2e summary permission
mengfei25 Jul 25, 2025
0a78df1
fix ut log path
mengfei25 Jul 25, 2025
074992f
update
mengfei25 Jul 25, 2025
b11510f
update
mengfei25 Jul 25, 2025
a18995b
modify e2e summary
mengfei25 Jul 25, 2025
754202d
modify e2e summary
mengfei25 Jul 25, 2025
27c5cff
modify e2e summary
mengfei25 Jul 25, 2025
92d7ff1
update
mengfei25 Jul 25, 2025
0fade31
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 4, 2025
56520ca
update
mengfei25 Aug 4, 2025
9117a0c
update
mengfei25 Aug 4, 2025
79155e5
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 4, 2025
587aa95
update
mengfei25 Aug 4, 2025
3b0b94d
update
mengfei25 Aug 4, 2025
e47b3e4
update
mengfei25 Aug 5, 2025
eafefa4
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 5, 2025
75c99ff
update
mengfei25 Aug 6, 2025
e244cb1
Update pull.yml
mengfei25 Aug 6, 2025
47cbdf5
modify pt2e
mengfei25 Aug 7, 2025
37e652e
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 7, 2025
de15a3f
update
mengfei25 Aug 7, 2025
8445b8b
e2e test matrix tests
mengfei25 Aug 11, 2025
a145fa2
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 11, 2025
8fe34c5
modify e2e summary
mengfei25 Aug 11, 2025
bfc98da
update
mengfei25 Aug 11, 2025
8c66acd
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 11, 2025
8064126
update
mengfei25 Aug 11, 2025
1ea6a62
update
mengfei25 Aug 11, 2025
530af25
update
mengfei25 Aug 11, 2025
091678f
update
mengfei25 Aug 11, 2025
eaa4bc4
update
mengfei25 Aug 11, 2025
f70ef8a
update deps
mengfei25 Aug 11, 2025
a12045a
update
mengfei25 Aug 11, 2025
70415c2
modify cache dir
mengfei25 Aug 11, 2025
5fcc6c6
update
mengfei25 Aug 12, 2025
263a393
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 12, 2025
18f22e0
update
mengfei25 Aug 12, 2025
2eb33ed
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
mengfei25 Aug 12, 2025
0add64e
update
mengfei25 Aug 12, 2025
8902540
update
mengfei25 Aug 13, 2025
0eda9f7
update
mengfei25 Aug 13, 2025
0aab07a
update
mengfei25 Aug 13, 2025
29a9fd8
update
mengfei25 Aug 13, 2025
c69854f
update
mengfei25 Aug 13, 2025
3d98b0e
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 13, 2025
a6b2302
merge main
mengfei25 Aug 13, 2025
0a17050
update
mengfei25 Aug 13, 2025
a7257b0
modify e2e summary
mengfei25 Aug 14, 2025
88af21f
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 14, 2025
8a54cfa
modify on-demand test
mengfei25 Aug 14, 2025
82783de
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
mengfei25 Aug 14, 2025
23f097f
modify on-demand test
mengfei25 Aug 14, 2025
a047acc
rebase
mengfei25 Aug 14, 2025
21aedbf
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 14, 2025
7df6ea3
rebase
mengfei25 Aug 14, 2025
946e547
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 18, 2025
0605da8
update
mengfei25 Aug 18, 2025
da64dea
remove env_prepare
mengfei25 Aug 19, 2025
0fa9e2b
remove duplicate
mengfei25 Aug 19, 2025
303883b
modify torch-xpu-ops parameter desc
mengfei25 Aug 19, 2025
1e0bcd4
rename get-runner
mengfei25 Aug 19, 2025
eb5f563
build torchvision and torchaudio with GCC11
mengfei25 Aug 19, 2025
c7ccbc7
remove rm -rf workspace if checkout
mengfei25 Aug 19, 2025
8639697
modify prepare env
mengfei25 Aug 19, 2025
695a9f1
use ubuntu-24.04 instead of latest
mengfei25 Aug 19, 2025
247adc6
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 19, 2025
a058b97
modify deps installation
mengfei25 Aug 20, 2025
6498c26
remove specific oneapi
mengfei25 Aug 20, 2025
2dc5f37
modify test_type parameter
mengfei25 Aug 20, 2025
a741aba
modify ut name
mengfei25 Aug 20, 2025
3fab342
update
mengfei25 Aug 21, 2025
00f823c
modify ut
mengfei25 Aug 21, 2025
c08b77a
modify ut
mengfei25 Aug 21, 2025
920baaf
modify
mengfei25 Aug 21, 2025
301dc74
modify
mengfei25 Aug 21, 2025
63ff56f
update
mengfei25 Aug 21, 2025
441914c
update
mengfei25 Aug 21, 2025
c8b76cf
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 21, 2025
64b2934
modify triton build
mengfei25 Aug 22, 2025
b5e11df
unify timeout
mengfei25 Aug 22, 2025
9120379
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 22, 2025
769fcb1
update
mengfei25 Aug 23, 2025
adfadb0
Merge branch 'mengfeil/containerd' of https://github.com/intel/torch-…
Aug 23, 2025
c17d557
lint
mengfei25 Aug 23, 2025
1a1b954
update
mengfei25 Aug 24, 2025
5550885
update
mengfei25 Aug 25, 2025
c0eb86d
update
mengfei25 Aug 25, 2025
4b553b0
update
mengfei25 Aug 25, 2025
4cb5fb5
modify torchao
mengfei25 Aug 25, 2025
1b3be5c
skip distributed case failed on rolling
zxd1997066 Aug 25, 2025
2b915b9
rebase
mengfei25 Aug 25, 2025
d39164b
Merge branch 'main' into mengfeil/containerd
mengfei25 Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/actions/get-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Get Runner Infos

outputs:
runner_id:
value: ${{ steps.runner.outputs.runner_id }}
user_id:
value: ${{ steps.runner.outputs.user_id }}
render_id:
value: ${{ steps.runner.outputs.render_id }}
hostname:
value: ${{ steps.runner.outputs.hostname }}

permissions: read-all

runs:
using: composite
steps:
- name: Get runner
shell: bash -xe {0}
id: runner
run: |
# get test runner
echo "runner_id=$(echo ${RUNNER_NAME} |sed 's/\-[0-9]$//')" |tee -a ${GITHUB_OUTPUT}
echo "user_id=$(id -u)" |tee -a ${GITHUB_OUTPUT}
echo "render_id=$(getent group render |cut -d: -f3)" |tee -a ${GITHUB_OUTPUT}
echo "hostname=$(hostname)" |tee -a ${GITHUB_OUTPUT}
# show host info
lscpu
lshw -C display
free -h
df -h
cat /etc/os-release
uname -a
- name: Cleanup host
shell: bash -xe {0}
run: |
# clean docker cache
docker system prune -af || true
# clean workspace
ls -al
sudo find ./ |grep -v "^\./$" |xargs sudo rm -rf
cd ${RUNNER_WORKSPACE}/..
if [ "${PWD}" != "/" ];then
ls -al
sudo chmod 777 -R torch-xpu-ops _temp _actions _tool || true
sudo rm -rf _temp
fi
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: inductor-xpu-e2e-test
name: Linux E2E Test

inputs:
env_prepare:
required: false
description: If set to any value, will prepare suite test env
suite:
required: true
type: string
default: 'huggingface'
description: Dynamo benchmarks test suite. huggingface,timm_models,torchbench. Delimiter is comma
env_prepare:
required: false
description: If set to any value, will prepare suite test env
dt:
required: true
type: string
Expand All @@ -24,49 +24,24 @@ inputs:
type: string
default: 'accuracy'
description: accuracy,performance. Delimiter is comma
cards:
required: false
type: string
default: 'all'
description: which cards can be used in the test
hf_token:
required: false
description: HUGGING_FACE_HUB_TOKEN for torchbench test
pytorch:
required: false
type: string
default: 'main'
description: Pytorch branch/commit
driver:
required: false
type: string
default: 'lts'
description: Driver lts/rolling

runs:
using: composite
steps:
- name: Prepare ENV
if: ${{ inputs.env_prepare }}
shell: bash
shell: bash -xe {0}
run: |
source activate e2e_ci
if [[ ${{ inputs.suite }} == *"torchbench"* ]]; then
if [ "${{ inputs.pytorch }}" != "nightly_wheel" ]; then
cd ../ && rm -rf audio && git clone --single-branch -b main https://github.com/pytorch/audio.git
cd audio && git checkout $TORCHAUDIO_COMMIT_ID
python setup.py bdist_wheel && pip uninstall torchaudio -y && pip install dist/*.whl
cd ../ && rm -rf vision && git clone --single-branch -b main https://github.com/pytorch/vision.git
cd vision && git checkout $TORCHVISION_COMMIT_ID
python setup.py bdist_wheel && pip uninstall torchvision -y && pip install dist/*.whl
fi
cd ../ && python -c "import torch, torchvision, torchaudio"
rm -rf benchmark && git clone https://github.com/pytorch/benchmark.git
cd benchmark && git checkout $TORCHBENCH_COMMIT_ID
python -c "import torch, torchvision, torchaudio"
cd ./pytorch
TORCHBENCH_COMMIT_ID=$(cat .github/ci_commit_pins/torchbench.txt)
git clone https://github.com/pytorch/benchmark.git xpu-benchmark
cd xpu-benchmark && git checkout $TORCHBENCH_COMMIT_ID
# remove deps which will reinstall torch
pip install --no-deps accelerate
pip install --no-deps git+https://github.com/huggingface/pytorch-image-models@$TIMM_COMMIT_ID
pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/$TIMM_COMMIT_ID/requirements.txt | grep -vE torch)
pip install --no-deps git+https://github.com/huggingface/pytorch-image-models@v1.0.14
pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/v1.0.14/requirements.txt | grep -vE torch)
pip install -U transformers==4.44.2
sed -i 's+.*pytorch-image-models.*++g;s+^accelerate.*++g;s/^transformers.*//g' requirements.txt
git status && git diff
Expand All @@ -81,28 +56,18 @@ runs:
pip install -U transformers==4.44.2
fi
if [[ ${{ inputs.suite }} == *"timm_models"* ]]; then
if [ "${{ inputs.pytorch }}" != "nightly_wheel" ]; then
cd ../ && rm -rf vision && git clone --single-branch -b main https://github.com/pytorch/vision.git
cd vision && git checkout $TORCHVISION_COMMIT_ID
python setup.py bdist_wheel && pip uninstall torchvision -y && pip install dist/*.whl
fi
# install timm without dependencies
pip install --no-deps git+https://github.com/huggingface/pytorch-image-models@$TIMM_COMMIT_ID
pip install --no-deps git+https://github.com/huggingface/pytorch-image-models@v1.0.14
# install timm dependencies without torch and torchvision
pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/$TIMM_COMMIT_ID/requirements.txt | grep -vE torch)
pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/v1.0.14/requirements.txt | grep -vE torch)
fi
pip install numpy==1.26.4
pip install -U numpy==1.26.4
pip list |grep -E 'intel|torch'
- name: E2E Test (${{ inputs.suite }} ${{ inputs.dt }} ${{ inputs.mode }} ${{ inputs.scenario }})
env:
HUGGING_FACE_HUB_TOKEN: ${{ inputs.hf_token }}
NEOReadDebugKeys: ${{ inputs.driver == 'rolling' && '1' || '0' }}
DisableScratchPages: ${{ inputs.driver == 'rolling' && '1' || '0' }}
shell: bash
shell: bash -xe {0}
run: |
source activate e2e_ci
cp .github/scripts/inductor_xpu_test.sh ../pytorch
cd ../pytorch

cp ./.github/scripts/inductor_xpu_test.sh ./pytorch
cd ./pytorch
# check param
function contains() {
contains_status="echo 'Start $2 ...'"
Expand All @@ -113,7 +78,6 @@ runs:
contains_status="continue"
}
}
set -xe
xpu_num=$(clinfo --list |awk 'BEGIN{gpu=0;}{if(gpu==1 && $0~/Platform/){gpu=0;}; if(gpu==1){print $0;}; if($0~/Platform.*Graphics/){gpu=1;}}' |wc -l)
cores_per_instance="$(lscpu |grep -E 'Core\(s\) per socket:|Socket\(s\):' |awk -v i="${xpu_num}" 'BEGIN{sum=1}{sum*=$NF}END{print sum/i}')"
export OMP_NUM_THREADS=${cores_per_instance}
Expand Down Expand Up @@ -160,24 +124,19 @@ runs:
done

- name: Summary E2E Test (${{ inputs.suite }} ${{ inputs.dt }} ${{ inputs.mode }} ${{ inputs.scenario }})
env:
HUGGING_FACE_HUB_TOKEN: ${{ inputs.hf_token }}
shell: bash
shell: bash -xe {0}
run: |
cd ../pytorch
cd ./pytorch
rm -f inductor_log/summary_accuracy.csv
for var in $(find inductor_log/ -name "inductor_*_xpu_accuracy.csv")
do
sed -i "s/$/,$(basename $var)/" $var
cat $var >> inductor_log/summary_accuracy.csv
done

source activate e2e_ci
cd ${{ github.workspace }}
cp .github/scripts/inductor_summary.py ../pytorch
cd ../pytorch
cp ./.github/scripts/inductor_summary.py ./pytorch
cd ./pytorch
pip install styleFrame scipy pandas
set -xe
dt=$(echo ${{ inputs.dt }} |sed 's/,/ /g')
mode=$(echo ${{ inputs.mode }} |sed 's/,/ /g')
suite=$(echo ${{ inputs.suite }} |sed 's/,/ /g')
Expand Down
135 changes: 135 additions & 0 deletions .github/actions/linux-testenv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Setup Test Environment

inputs:
test_type:
required: true
type: string
description: Test scope
pytorch:
type: string
default: 'main'
description: Pytorch main by default, or 'commit/branch', or 'repo@commit/repo@branch'
torch_xpu_ops:
type: string
default: 'main'
description: Torch-xpu-ops main by default, 'commit/branch', or 'repo@commit/repo@branch', or 'pinned' for pytorch pin
oneapi:
type: string
default: 'installed'
description: Installed oneAPI DLE on host by default, fill offline.sh url if needed
python:
type: string
default: '3.10'
description: Python version

permissions: read-all

runs:
using: composite
steps:
- name: Setup python-${{ inputs.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
- name: Check runner
shell: bash -xe {0}
run: |
hostname && id
cat /etc/os-release
gcc -v && g++ -v
which python && python -V
which pip && pip list
pip install -U pip wheel setuptools
uname -a
dpkg -l |grep -E 'libigc-dev|libze-dev|level-zero-dev'
clinfo --list
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor |sort |uniq -c
rm -rf ~/.triton /tmp/*inductor*
pip install pandas psutil scipy requests pytest-timeout
- name: Checkout torch-xpu-ops
uses: actions/checkout@v4
with:
path: torch-xpu-ops
- name: Install oneAPI DLE
shell: bash -xe {0}
if: ${{ inputs.oneapi != 'installed' }}
run: |
rm -rf ~/intel ~/.intel
wget -q -O oneapi.sh "${{ inputs.oneapi }}"
bash oneapi.sh -a -s --eula accept --action install --install-dir ${HOME}/intel/oneapi
echo "XPU_ONEAPI_PATH=${HOME}/intel/oneapi" >> ${GITHUB_ENV}
source ${HOME}/intel/oneapi/setvars.sh
sycl-ls && icpx -v
- name: Download Pytorch wheel
if: ${{ ! contains(inputs.test_type, 'wheel') }}
uses: actions/download-artifact@v4
with:
pattern: Torch-XPU-Wheel-*
- name: Prepare Stock Pytorch
shell: bash -xe {0}
run: |
# install pytorch
if [ $(echo "${{ inputs.pytorch }}" |grep -w "release_wheel" -c) -ne 0 ];then
pip install torch torchvision torchaudio --pre --index-url https://download.pytorch.org/whl/xpu
elif [ $(echo "${{ inputs.pytorch }}" |grep -w "test_wheel" -c) -ne 0 ];then
pip install torch torchvision torchaudio --pre --index-url https://download.pytorch.org/whl/test/xpu
elif [ $(echo "${{ inputs.pytorch }}" |grep -w "nightly_wheel" -c) -ne 0 ];then
pip install torch torchvision torchaudio --pre --index-url https://download.pytorch.org/whl/nightly/xpu
else
pip install --force-reinstall $(find ${{ github.workspace }}/ -name "*torch*.whl")
fi
pip list |grep torch
TORCH_COMMIT_ID=$(python -c 'import torch; print(torch.version.git_version)')
if [[ "${{ inputs.pytorch }}" == *"https://"* ]];then
PYTORCH_REPO="$(echo ${{ inputs.pytorch }} |sed 's/@.*//')"
else
PYTORCH_REPO="https://github.com/pytorch/pytorch.git"
fi
git clone ${PYTORCH_REPO} pytorch
cd pytorch
git checkout ${TORCH_COMMIT_ID}
pip install -r .ci/docker/requirements-ci.txt
# apply extra PRs for stock pytorch
if [[ "${{ inputs.test_type }}" == *"cicd"* ]];then
python ../torch-xpu-ops/.github/scripts/apply_torch_pr.py -e https://github.com/pytorch/pytorch/pull/152940
else
python ../torch-xpu-ops/.github/scripts/apply_torch_pr.py
fi
git status && git diff && git show -s
- name: Prepare Torch-xpu-ops
shell: bash -xe {0}
if: ${{ inputs.torch_xpu_ops != 'skipped' }}
run: |
cd pytorch
rm -rf third_party/torch-xpu-ops
if [[ "${{ inputs.torch_xpu_ops }}" == *"https://"* ]];then
TORCH_XPU_OPS_REPO="$(echo ${{ inputs.torch_xpu_ops }} |sed 's/@.*//')"
TORCH_XPU_OPS_COMMIT="$(echo ${{ inputs.torch_xpu_ops }} |sed 's/.*@//')"
else
TORCH_XPU_OPS_REPO="https://github.com/intel/torch-xpu-ops.git"
if [ "${{ inputs.torch_xpu_ops }}" == "pinned" ];then
TORCH_XPU_OPS_COMMIT="$(cat third_party/xpu.txt)"
else
TORCH_XPU_OPS_COMMIT="${{ inputs.torch_xpu_ops }}"
fi
fi
if [ "${{ inputs.test_type }}" == "cicd" ];then
cp -r ${{ github.workspace }}/torch-xpu-ops third_party/torch-xpu-ops
else
git clone ${TORCH_XPU_OPS_REPO} third_party/torch-xpu-ops
fi
cd third_party/torch-xpu-ops
git checkout ${TORCH_XPU_OPS_COMMIT}
git status && git diff && git show -s
- name: Torch Config
shell: bash -xe {0}
run: |
printenv
python -c "import torch; print(torch.__config__.show())"
python -c "import torch; print(torch.__config__.parallel_info())"
python -c "import torch; print(torch.__config__.torch.xpu.device_count())"
python -c "import torchvision; print(torchvision.__version__)"
python -c "import torchaudio; print(torchaudio.__version__)"
python -c "import triton; print(triton.__version__)"
python pytorch/torch/utils/collect_env.py
pip list |grep -E 'torch|intel'
Loading
Loading