Skip to content

Commit ea48cc4

Browse files
authored
[Nightly] Modify nightly test workflows (#1752)
1. fix windows ut issue 2. modify torchbench installation to reduce reinstalling torch 3. remove merged pr in apply_torch_pr.py 4. remove DLE source to use pypi packages _linux_op_benchmark.yml disable_ut disable_distributed disable_windows Co-authored-by: mengfeil <test>
1 parent aa6954b commit ea48cc4

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/actions/inductor-xpu-e2e-test/action.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ runs:
6262
fi
6363
cd ../ && python -c "import torch, torchvision, torchaudio"
6464
rm -rf benchmark && git clone https://github.com/pytorch/benchmark.git
65-
cd benchmark && git checkout $TORCHBENCH_COMMIT_ID && pip install --no-deps -r requirements.txt
65+
cd benchmark && git checkout $TORCHBENCH_COMMIT_ID
66+
# remove deps which will reinstall torch
67+
pip install --no-deps accelerate
68+
pip install --no-deps $(cat requirements.txt |grep 'pytorch-image-models')
69+
timm_commit="$(grep 'pytorch-image-models' requirements.txt |awk -F '@' '{print $2}')"
70+
pip install $(curl -sSL https://raw.githubusercontent.com/huggingface/pytorch-image-models/${timm_commit:-"main"}/requirements.txt | grep -vE torch)
71+
sed -i 's+.*pytorch-image-models.*++g;s+^accelerate.*++g' requirements.txt
72+
pip install -r requirements.txt
6673
python install.py --continue_on_fail
6774
# deps for torchrec_dlrm
6875
pip install pyre_extensions
6976
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
70-
pip install torchmetrics==1.0.3
71-
pip install torchrec --no-deps --index-url https://download.pytorch.org/whl/nightly/cpu
77+
pip install --no-deps lightning-utilities==0.14.3 torchmetrics==1.0.3 tensordict torchrec
7278
fi
7379
if [[ ${{ inputs.suite }} == *"huggingface"* ]]; then
7480
pip install --force-reinstall git+https://github.com/huggingface/transformers@${TRANSFORMERS_VERSION}
@@ -127,7 +133,7 @@ runs:
127133
contains "accuracy,performance" $scenario
128134
$contains_status
129135
if [ "${MODEL_ONLY_NAME}" == "" ];then
130-
xpu_list=($(xpu-smi discovery |grep 'DRM Device: /dev/' |sed 's/.*card//;s/[^0-9].*//' |awk '{print $1 - 1":"NR - 1}'))
136+
xpu_list=($(xpu-smi discovery |grep 'DRM Device: /dev/' |sed 's/.*card//;s/[^0-9].*//' |awk '{if($1==0){print $1":"NR - 1}else{print $1 - 1":"NR - 1}}'))
131137
for xpu_id in ${xpu_list[*]}
132138
do
133139
bash inductor_xpu_test.sh ${suite} ${dt} ${mode} ${scenario} xpu ${xpu_id/:*} static ${#xpu_list[*]} ${xpu_id/*:} &

.github/scripts/apply_torch_pr.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
"https://github.com/pytorch/pytorch/pull/126516",
1414
# Modify the tolerance level in TIMM benchmark
1515
"https://github.com/pytorch/pytorch/pull/143739",
16-
# Allow XPU device for validating the arguments to sparse compressed tensor factory functions
17-
"https://github.com/pytorch/pytorch/pull/147306",
18-
"Enhance testing infrastructure to add half-precision support for histc on XPU"
16+
# "Enhance testing infrastructure to add half-precision support for histc on XPU"
1917
"https://github.com/pytorch/pytorch/pull/154339",
2018
]
2119
)

.github/workflows/_linux_op_benchmark.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ jobs:
7979
- name: Install Pytorch XPU
8080
run: |
8181
source activate xpu_op_${ZE_AFFINITY_MASK}
82-
source .github/scripts/env.sh ${{ inputs.pytorch }}
8382
if [ "${{ inputs.pytorch }}" != "nightly_wheel" ]; then
8483
cd ../pytorch
8584
export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
@@ -94,7 +93,6 @@ jobs:
9493
- name: Torch Config
9594
run: |
9695
source activate xpu_op_${ZE_AFFINITY_MASK}
97-
source .github/scripts/env.sh ${{ inputs.pytorch }}
9896
python -c "import torch; print(torch.__config__.show())"
9997
python -c "import torch; print(torch.__config__.parallel_info())"
10098
python -c "import torch; print(torch.__config__.torch.xpu.device_count())"
@@ -106,7 +104,6 @@ jobs:
106104
- name: Run Torch XPU Op Benchmark
107105
if: ${{ inputs.driver == 'rolling' }}
108106
run: |
109-
source .github/scripts/env.sh ${{ inputs.pytorch }}
110107
source activate xpu_op_${ZE_AFFINITY_MASK}
111108
mkdir -p ${{ github.workspace }}/op_benchmark
112109
cd test/microbench

.github/workflows/_linux_transformers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ jobs:
313313

314314
report:
315315
needs: tests
316-
if: "always()"
316+
if: ${{ always() }}
317317
runs-on: ${{ inputs.runner != '' && inputs.runner || 'linux.idc.xpu' }}
318318
steps:
319319
- name: Download reports

.github/workflows/nightly_ondemand.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ jobs:
361361
keep_torch_xpu_ops: ${{ github.event_name == 'schedule' && 'false' || inputs.keep_torch_xpu_ops }}
362362
ut: ${{ github.event_name == 'schedule' && 'op_extended,torch_xpu' || inputs.ut }}
363363
python: ${{ github.event_name == 'schedule' && '3.10' || inputs.python }}
364-
files-changed: false
365-
has-label: true
364+
src_changed: false
365+
has_label: true
366366
runner: Windows_CI
367367

368368
Tests-Failure-And-Report:

0 commit comments

Comments
 (0)