@@ -45,42 +45,26 @@ jobs:
45
45
get_runner :
46
46
runs-on : ${{ inputs.runner }}
47
47
outputs :
48
- test_host : ${{ steps.runner-info.outputs.test_host }}
49
- test_user : ${{ steps.runner-info.outputs.test_user }}
50
- test_group : ${{ steps.runner-info.outputs.test_group }}
48
+ runner_id : ${{ steps.runner-info.outputs.runner_id }}
49
+ user_id : ${{ steps.runner-info.outputs.user_id }}
50
+ render_id : ${{ steps.runner-info.outputs.render_id }}
51
+ hostname : ${{ steps.runner-info.outputs.hostname }}
51
52
steps :
52
- - name : Get runner info
53
+ - name : Checkout torch-xpu-ops
54
+ uses : actions/checkout@v4
55
+ - name : Get runner
53
56
id : runner-info
54
- run : |
55
- # get test runner
56
- echo "test_host=${RUNNER_NAME}" |tee -a ${GITHUB_OUTPUT}
57
- echo "test_user=$(id -u)" |tee -a ${GITHUB_OUTPUT}
58
- echo "test_group=$(getent group render |cut -d: -f3)" |tee -a ${GITHUB_OUTPUT}
59
- # show host info
60
- cat /etc/os-release
61
- uname -a
62
- source /opt/intel/oneapi/setvars.sh
63
- sycl-ls
64
- dpkg -l |grep -E 'libigc-dev|libze-dev|level-zero-dev'
65
- - name : Cleanup workspace
66
- if : ${{ always() }}
67
- run : |
68
- # clean docker cache
69
- docker stop $(docker ps -aq) || true
70
- docker system prune -af || true
71
- # clean files
72
- ls -al
73
- sudo find ./ |grep -v "^\./$" |xargs sudo rm -rf
57
+ uses : ./.github/actions/get-runner
74
58
75
59
biisect-search :
76
60
needs : get_runner
77
- runs-on : ${{ needs.get_runner.outputs.test_host }}
61
+ runs-on : ${{ needs.get_runner.outputs.runner_id }}
78
62
container :
79
63
image : mengfeili/intel-pvc-driver:1146-1136
80
64
volumes :
81
65
- ${{ github.workspace }}:${{ github.workspace }}
82
66
options : --device=/dev/mem --device=/dev/dri --group-add video --privileged --shm-size=8g
83
- -u ${{ needs.get_runner.outputs.test_user }}: ${{ needs.get_runner.outputs.test_group }}
67
+ -u ${{ needs.get_runner.outputs.user_id }} --group-add ${{ needs.get_runner.outputs.render_id }}
84
68
env :
85
69
AGENT_TOOLSDIRECTORY : /tmp/xpu-tool
86
70
SEARCH_COMMITS : ${{ inputs.search_commits }}
@@ -95,33 +79,19 @@ jobs:
95
79
HF_TOKEN : ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
96
80
HUGGING_FACE_HUB_TOKEN : ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
97
81
steps :
98
- - name : Check runner
99
- run : |
100
- ls -al
101
- sudo find ./ |grep -v "^\./$" |xargs sudo rm -rf
102
- sudo rm -rf /tmp/xpu-tool
103
- - name : Setup python-${{ inputs.python }}
104
- uses : actions/setup-python@v5
82
+ - name : Checkout torch-xpu-ops
83
+ uses : actions/checkout@v4
105
84
with :
106
- python-version : ${{ inputs.python }}
107
- - name : Check runner
108
- run : |
109
- hostname && whoami && id
110
- clinfo --list
111
- gcc -v && g++ -v
112
- which python && which pip
113
- python -V
114
- pip install -U pip wheel setuptools
115
- pip list
116
- uname -a
117
- dpkg -l |grep -E 'libigc-dev|libze-dev|level-zero-dev'
118
- pip install cmake ninja pandas psutil scipy requests pybind11
119
- mkdir gs-logs gs-search
120
- echo "Status,Acc,Perf,PyTorch,Torch-xpu-ops" > gs-logs/summary.csv
85
+ path : gs-scripts
86
+ - name : Prepare test env
87
+ uses : ./gs-scripts/.github/actions/linux-testenv
88
+ with :
89
+ pytorch : nightly_wheel
90
+ python : ${{ inputs.python }}
121
91
- name : Install oneAPI DLE
122
92
if : ${{ inputs.oneapi != 'installed' }}
123
93
run : |
124
- rm -rf ~/intel ~/.intel /tmp /intel
94
+ rm -rf ~/intel ~/.intel ${HOME} /intel
125
95
if [ "${{ inputs.oneapi }}" == "2025.1" ];then
126
96
ONEAPI_URL="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/3435dc45-055e-4f7a-86b1-779931772404/intel-deep-learning-essentials-2025.1.3.7_offline.sh"
127
97
elif [ "${{ inputs.oneapi }}" == "2025.2" ];then
@@ -130,42 +100,42 @@ jobs:
130
100
ONEAPI_URL="${{ inputs.oneapi }}"
131
101
fi
132
102
wget -q -O oneapi.sh "${ONEAPI_URL}"
133
- bash oneapi.sh -a -s --eula accept --action install --install-dir /tmp/intel/oneapi
134
- echo "XPU_ONEAPI_PATH=/tmp/intel/oneapi" >> ${GITHUB_ENV}
135
- - name : Checkout torch-xpu-ops
136
- uses : actions/checkout@v4
137
- with :
138
- path : gs-scripts
139
- - name : Prepare source code
103
+ bash oneapi.sh -a -s --eula accept --action install --install-dir ${HOME}/intel/oneapi
104
+ echo "XPU_ONEAPI_PATH=${HOME}/intel/oneapi" >> ${GITHUB_ENV}
105
+
106
+ - name : Summary file
140
107
run : |
141
- git clone https://github.com/pytorch/pytorch gs-pytorch
142
- cd gs-pytorch
108
+ mkdir -p gs-logs
109
+ echo "Status,Acc,Perf,PyTorch,Torch-xpu-ops" > gs-logs/summary.csv
110
+ - name : Get latest versions
111
+ run : |
112
+ cd pytorch
143
113
LATEST_PT_COMMIT="$(git rev-parse HEAD)"
144
- cd ..
145
- git clone https://github.com/intel/torch-xpu-ops gs-torch-xpu-ops
146
- cd gs-torch-xpu-ops
114
+ cd third_party/torch-xpu-ops
147
115
LATEST_XPU_COMMIT="$(git rev-parse HEAD)"
148
- cd ..
149
116
echo "LATEST_PT_COMMIT=${LATEST_PT_COMMIT}" >> ${GITHUB_ENV}
150
117
echo "LATEST_XPU_COMMIT=${LATEST_XPU_COMMIT}" >> ${GITHUB_ENV}
151
118
- name : Prepare test env
152
119
run : |
153
- pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu
154
120
if [[ "${{ inputs.search_case }}" == *"benchmarks/dynamo/huggingface.py"* ]];then
155
- pip install transformers==4.44.2
121
+ pip install transformers
156
122
elif [[ "${{ inputs.search_case }}" == *"benchmarks/dynamo/timm_models.py"* ]];then
157
- pip install --no-deps git+https://github.com/huggingface/[email protected]
158
- pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/v1.0.14/requirements.txt | grep -vE torch)
123
+ pip install timm
159
124
elif [[ "${{ inputs.search_case }}" == *"benchmarks/dynamo/torchbench.py"* ]];then
160
125
model_name="$(echo ${{ inputs.search_case }} |sed 's+.*\--only *++;s/ .*//')"
161
126
git clone https://github.com/pytorch/benchmark gs-benchmark
162
127
cd gs-benchmark
128
+ pip install -r requirements.txt
163
129
echo "PYTHONPATH=${PWD}:${PYTHONPATH}" >> ${GITHUB_ENV}
164
130
python install.py ${model_name}
165
- else
166
- pip install -r gs-pytorch/.ci/docker/requirements-ci.txt
131
+ cd ..
167
132
fi
168
- pip uninstall -y torch && pip uninstall -y torch
133
+ pip uninstall -y torchvision torchaudio
134
+ git clone https://github.com/pytorch/vision gs-vision
135
+ cd gs-vision
136
+ python setup.py install
137
+ cd ..
138
+ pip uninstall -y torch
169
139
- name : Bisect search pytorch
170
140
if : ${{ contains(inputs.search_commits, 'pytorch') }}
171
141
run : |
@@ -186,7 +156,7 @@ jobs:
186
156
> ${{ github.workspace }}/gs-logs/search-${new_commit}-${LATEST_XPU_COMMIT}.log 2>&1 && echo $? || echo $?)"
187
157
new_result="$(tail -n 1 ${{ github.workspace }}/gs-search/result.csv)"
188
158
if [ "${old_status}" != "${new_status}" ];then
189
- cd gs- pytorch
159
+ cd pytorch
190
160
git reset --hard
191
161
rsync -avz --delete ${{ github.workspace }}/gs-scripts/ gs-scripts/
192
162
git bisect start ${new_commit} ${old_commit}
@@ -219,7 +189,7 @@ jobs:
219
189
> ${{ github.workspace }}/gs-logs/search-${LATEST_PT_COMMIT}-${new_commit}.log && echo $? || echo $?)"
220
190
new_result="$(tail -n 1 ${{ github.workspace }}/gs-search/result.csv)"
221
191
if [ "${old_status}" != "${new_status}" ];then
222
- cd gs- pytorch
192
+ cd pytorch
223
193
git reset --hard
224
194
rsync -avz --delete ${{ github.workspace }}/gs-scripts/ gs-scripts/
225
195
git bisect start ${new_commit} ${old_commit}
0 commit comments