Skip to content

Commit

Permalink
[CI] enable abi=0 build and ut test in CI and Weekly (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanqi129 authored Aug 6, 2024
1 parent 24a4557 commit 725d688
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/_linux_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
type: string
default: ''
description: UT scope. `op_example,op_extended,op_ut,torch_xpu` Delimiter is comma
abi:
required: false
type: string
default: 1
description: ABI version. Default abi as 1.
python:
required: false
type: string
Expand Down Expand Up @@ -70,10 +75,22 @@ jobs:
export USE_XPU=1
source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
if [[ ${{ inputs.abi }} == '0' ]]; then
export _GLIBCXX_USE_CXX11_ABI=0
else
export _GLIBCXX_USE_CXX11_ABI=1
fi
WERROR=1 python setup.py bdist_wheel
pip install --force-reinstall dist/*.whl
git clone https://github.com/pytorch/vision && cd vision && python setup.py install && cd ..
pip install -r .ci/docker/requirements-ci.txt
- name: Torch Config
run: |
source activate xpu_op_${ZE_AFFINITY_MASK}
source /opt/intel/oneapi/pytorch-gpu-dev-0.5/oneapi-vars.sh
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())"
- name: Run XPU OP Examples
if: contains(inputs.ut, 'op_example') || github.event_name == 'schedule'
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly_ondemand.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ jobs:
pytorch: ${{ github.event_name == 'schedule' && 'main' || inputs.pytorch }}
python: ${{ github.event_name == 'schedule' && '3.10' || inputs.python }}
runner: linux.idc.xpu

Linux-Weekly-UT-Tests-ABI-0:
if: github.event_name == 'schedule' && github.event.schedule == '0 16 * * 5'
uses: ./.github/workflows/_linux_ut.yml
with:
abi: 0
ut: op_example,op_extended,op_ut,torch_xpu
runner: linux.idc.xpu

Linux-Nightly-Ondemand-E2E-Tests:
runs-on: pvc_e2e
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
ut: op_example,op_extended,op_ut
runner: linux.idc.xpu

preci-ut-abi-0:
# Don't run on forked repos and draft PRs
if: ${{ (github.repository_owner == 'intel') && (github.event.pull_request.draft == false) }}
uses: ./.github/workflows/_linux_ut.yml
with:
abi: 0
ut: op_extended
runner: linux.idc.xpu

Inductor-XPU-E2E-CI-Tests:
runs-on: pvc_e2e
# Don't run on forked repos and draft PRs
Expand Down

0 comments on commit 725d688

Please sign in to comment.