@@ -127,6 +127,10 @@ jobs:
127127 DEBUG=1
128128 python -m build --wheel --no-isolation && pip install dist/*.whl
129129
130+ - name : Build PTI
131+ run : |
132+ ./scripts/install-pti.sh --build-level-zero
133+
130134 - name : Set test-triton command line
131135 id : test-triton
132136 run : |
@@ -175,6 +179,12 @@ jobs:
175179 name : triton-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
176180 path : dist/*.whl
177181
182+ - name : Upload PTI wheels
183+ uses : actions/upload-artifact@v4
184+ with :
185+ name : pti-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
186+ path : .scripts_cache/pti/dist/*.whl
187+
178188 - name : Upload test reports
179189 uses : actions/upload-artifact@v5
180190 with :
@@ -242,11 +252,23 @@ jobs:
242252 with :
243253 name : triton-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
244254
255+ - name : Download PTI wheels
256+ uses : actions/download-artifact@v5
257+ with :
258+ name : pti-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
259+
245260 - name : Install Triton
246261 run : |
247262 pip install triton-*.whl
248263 python -c 'import triton; print(triton.__version__)'
249264
265+ - name : Install PTI
266+ run : |
267+ pip install intel_pti-*.whl
268+ PTI_LIBS_DIR=$(python ./scripts/pti_lib.py)
269+ ls $PTI_LIBS_DIR
270+ echo "PTI_LIBS_DIR=$PTI_LIBS_DIR" | tee -a $GITHUB_ENV
271+
250272 - name : Report environment details
251273 run : |
252274 if [ "${{ matrix.suite }}" == "minicore" ]; then
@@ -283,21 +305,7 @@ jobs:
283305 - name : Build PTI && Run Proton tests
284306 if : matrix.suite == 'rest'
285307 run : |
286- # `intel-pti` can be installed in "Setup PyTorch" step with `pytorch_mode==wheels`
287- pip uninstall intel-pti -y
288- PTI_COMMIT_ID="$(<.github/pins/pti.txt)"
289- git clone https://github.com/intel/pti-gpu.git
290- cd pti-gpu
291- git checkout $PTI_COMMIT_ID
292- cd sdk
293- cmake --preset linux-icpx-release
294- BUILD_TESTING=1 PTI_BUILD_SAMPLES=1 cmake --build --preset linux-icpx-release
295-
296- PTI_LIBS_DIR="$(pwd)/build-linux-icpx-release/lib/"
297- cd ../..
298-
299- export LD_LIBRARY_PATH=$PTI_LIBS_DIR:$LD_LIBRARY_PATH
300- export TRITON_XPUPTI_LIB_PATH=$PTI_LIBS_DIR
308+ export LD_LIBRARY_PATH=${{ env.PTI_LIBS_DIR }}:$LD_LIBRARY_PATH
301309 cd third_party/proton/test
302310 pytest test_api.py test_cmd.py test_lib.py test_profile.py test_viewer.py --device xpu -s -v
303311 cd ..
0 commit comments