Skip to content

Nightly-OnDemand Tests #1110

Nightly-OnDemand Tests

Nightly-OnDemand Tests #1110

name: Nightly-OnDemand Tests
on:
workflow_dispatch:
inputs:
test:
type: string
default: ''
permissions: read-all
jobs:
debug:
runs-on: linux.idc.xpu
if: ${{ 1 == 1 }}
container:
image: mengfeili/intel-pvc-driver:1146-1136
volumes:
- ${{ github.workspace }}:${{ github.workspace }}
options: --device=/dev/mem --device=/dev/dri --group-add video --security-opt seccomp=unconfined --cap-add=SYS_PTRACE --shm-size=8g
-u 1000:109
env:
AGENT_TOOLSDIRECTORY: /tmp/xpu-tool
env:
GH_TOKEN: ${{ github.token }}
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
HF_TOKEN: ${{ secrets.HF_TOKEN }}
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Test
run: |
pip install huggingface-hub
printenv
runner:
runs-on: pvc_rolling
if: ${{ 1 == 0 }}
name: get-runner
outputs:
runner_id: ${{ steps.runner-info.outputs.runner_id }}
user_id: ${{ steps.runner-info.outputs.user_id }}
render_id: ${{ steps.runner-info.outputs.render_id }}
hostname: ${{ steps.runner-info.outputs.hostname }}
xpu_num: ${{ steps.runner-info.outputs.xpu_num }}
cpus_per_xpu: ${{ steps.runner-info.outputs.cpus_per_xpu }}
steps:
- name: Cleanup workspace
run: |
sudo find ./ |grep -v "^\./$" |xargs sudo rm -rf
- name: Checkout torch-xpu-ops
uses: actions/checkout@v4
- name: Get runner
id: runner-info
uses: ./.github/actions/get-runner
test:
runs-on: ${{ needs.runner.outputs.runner_id }}
needs: runner
timeout-minutes: 3600
strategy:
matrix:
build: [nightly, release]
container:
image: mengfeili/intel-pvc-driver:1146-1136
volumes:
- ${{ github.workspace }}:${{ github.workspace }}
options: --device=/dev/mem --device=/dev/dri --group-add video --security-opt seccomp=unconfined --cap-add=SYS_PTRACE --shm-size=8g
-u ${{ needs.runner.outputs.user_id }}:${{ needs.runner.outputs.render_id }}
env:
AGENT_TOOLSDIRECTORY: /tmp/xpu-tool
xpu_num: ${{ needs.runner.outputs.xpu_num }}
cpus_per_xpu: ${{ needs.runner.outputs.cpus_per_xpu }}
env:
GH_TOKEN: ${{ github.token }}
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
HF_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }}
steps:
- name: Checkout torch-xpu-ops
uses: actions/checkout@v4
- name: Prepare test env on ${{ needs.runner.outputs.hostname }}
uses: ./.github/actions/linux-testenv
with:
pytorch: ${{ matrix.build == 'nightly' && 'nightly_wheel' || 'release_wheel' }}
python: '3.10'
suite: torchbench
- name: Test
run: |
pip install joblib threadpoolctl
cd pytorch
cp ${{ github.workspace }}/run.sh .
cp ${{ github.workspace }}/test.txt .
./run.sh performance 0 test.txt || true
rm -rf ${{ github.workspace }}/logs
cp -r ${HOME}/mengfeil/logs ${{ github.workspace }}/logs
- name: Upload Inductor XPU E2E Data
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: Inductor-${{ matrix.build }}
path: ${{ github.workspace }}/logs