Skip to content

Commit 8cdf476

Browse files
authored
[CI] Fix and enable python interface tests (#545)
1 parent c1e79bb commit 8cdf476

File tree

1 file changed

+41
-14
lines changed

1 file changed

+41
-14
lines changed

.github/workflows/sycl_python_test.yml

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@ name: "SYCL Python Interface Test"
22

33
on:
44
push:
5-
branches: [ "sycl-develop" ]
5+
branches: [ "main" ]
66
pull_request:
7-
branches: [ "sycl-develop" ]
7+
branches: [ "main" ]
88
merge_group:
9-
branches: [ "sycl-develop" ]
9+
branches: [ "main" ]
1010
workflow_dispatch:
11-
inputs:
12-
DPCPP_VERSION:
13-
description: "DPCPP version to use"
14-
type: string
1511

1612
permissions: {}
1713

@@ -22,31 +18,32 @@ concurrency:
2218
jobs:
2319
run-tests:
2420
name: Run Python Interface tests on Intel PVC
25-
# strategy:
26-
# matrix:
27-
# compiler: [ NIGHTLY, RELEASE ]
28-
runs-on: cp-gpumax-1100-gpu
21+
runs-on: pvc
2922
timeout-minutes: 60
3023

3124
steps:
3225
- name: Checkout repository
3326
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
27+
3428
- name: Setup Python
3529
uses: actions/setup-python@v5
3630
with:
3731
python-version: '3.12'
32+
3833
- name: Install Intel graphics drivers
3934
uses: ./.github/actions/install-intel-graphics
4035
with:
4136
GPU: 'PVC'
4237
IGC: 'ROLLING'
38+
4339
- name: Install DPC++
4440
id: install_dpcpp
4541
uses: ./.github/actions/install-dpcpp
4642
with:
47-
# DPCPP_RELEASE: ${{ matrix.compiler }}
48-
DPCPP_VERSION: ${{ inputs.DPCPP_VERSION }}
43+
DPCPP_RELEASE: RELEASE
44+
#DPCPP_VERSION: ${{ inputs.DPCPP_VERSION }}
4945
DPCPP_PATH: ~/dpcpp
46+
5047
- name: Setup virtual environment
5148
shell: bash
5249
run: |
@@ -65,12 +62,14 @@ jobs:
6562
DPCTL_BRANCH: master
6663
DPCTL_PATH: ~/dpctl
6764
VENV_PATH: ~/.venv
65+
6866
- name: Install Torch XPU
6967
shell: bash
7068
run: |
7169
source ~/.venv/bin/activate
7270
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/test/xpu
7371
pip uninstall --yes intel-sycl-rt intel-cmplr-lib-ur umf
72+
7473
- name: Run Python Interface GEMM Tests
7574
shell: bash
7675
run: |
@@ -79,4 +78,32 @@ jobs:
7978
export CUTLASS_USE_SYCL=1
8079
export SYCL_UR_TRACE=2
8180
export ONEAPI_DEVICE_SELECTOR=level_zero:gpu
82-
python test/python/cutlass/gemm/run_all_tests.py
81+
python test/python/cutlass/gemm/gemm_bf16_pvc.py
82+
83+
- name: Cleanup DPC++
84+
if: always()
85+
shell: bash
86+
run: |
87+
echo "Cleaning up DPC++ installation..."
88+
echo "Removing OneAPI packages..."
89+
sudo apt remove -y intel-oneapi-runtime-libs intel-oneapi-compiler-dpcpp-cpp || true
90+
sudo rm -f /etc/apt/sources.list.d/oneAPI.list
91+
sudo rm -f /usr/share/keyrings/oneapi-archive-keyring.gpg
92+
# Clean up environment files
93+
rm -f setvars.sh
94+
# Clean up build artifacts
95+
rm -rf build/ || true
96+
echo "DPC++ cleanup completed"
97+
98+
- name: Cleanup DPCTL
99+
if: always()
100+
shell: bash
101+
run: |
102+
echo "Cleaning up DPCTL installation..."
103+
DPCTL_PATH="${{ inputs.DPCTL_PATH || '~/dpctl' }}"
104+
DPCTL_PATH=$(eval echo $DPCTL_PATH) # Expand ~ to home directory
105+
if [ -d "$DPCTL_PATH" ]; then
106+
echo "Removing DPCTL directory: $DPCTL_PATH"
107+
sudo rm -rf "$DPCTL_PATH"
108+
fi
109+
echo "DPCTL cleanup completed"

0 commit comments

Comments
 (0)