File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
.github/actions/inductor-xpu-e2e-test Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ runs:
113
113
}
114
114
}
115
115
set -xe
116
+ 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}}'))
117
+ cores_per_instance="$(lscpu |grep -E 'Core\(s\) per socket:|Socket\(s\):' |awk -v i="${#xpu_list[*]}" 'BEGIN{sum=1}{sum*=$NF}END{print sum/i}')"
118
+ export OMP_NUM_THREADS=${cores_per_instance}
116
119
for suite in $(echo ${{ inputs.suite }} |sed 's/,/ /g')
117
120
do
118
121
if [ "${suite}" == "pt2e" ];then
@@ -133,15 +136,15 @@ runs:
133
136
contains "accuracy,performance" $scenario
134
137
$contains_status
135
138
if [ "${MODEL_ONLY_NAME}" == "" ];then
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}}'))
137
139
for xpu_id in ${xpu_list[*]}
138
140
do
139
- bash inductor_xpu_test.sh ${suite} ${dt} ${mode} ${scenario} xpu ${xpu_id/:*} static ${#xpu_list[*]} ${xpu_id/*:} &
141
+ cpu_list="$(echo "${cores_per_instance} ${xpu_id/*:}" |awk '{printf("%d-%d", $1*$2, $1*$2+$1-1)}')"
142
+ numactl --localalloc --physcpubind=${cpu_list} bash inductor_xpu_test.sh ${suite} ${dt} ${mode} ${scenario} xpu ${xpu_id/:*} static ${#xpu_list[*]} ${xpu_id/*:} &
140
143
done
141
144
else
142
145
for test_model in $(echo ${MODEL_ONLY_NAME} |sed 's/,/ /g')
143
146
do
144
- bash inductor_xpu_test.sh ${suite} ${dt} ${mode} ${scenario} xpu 0 static 1 0 ${test_model}
147
+ numactl --localalloc bash inductor_xpu_test.sh ${suite} ${dt} ${mode} ${scenario} xpu 0 static 1 0 ${test_model}
145
148
done
146
149
fi
147
150
wait
You can’t perform that action at this time.
0 commit comments