Skip to content

Commit 2dff98c

Browse files
committed
remove auto setting from HT, since it's hard to unify with MacOS
1 parent 714fa9e commit 2dff98c

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

benchmark/paddle/image/run_mkldnn.sh

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ set -e
22

33
function train() {
44
unset OMP_NUM_THREADS MKL_NUM_THREADS
5+
export OMP_DYNAMIC="FALSE"
6+
export KMP_AFFINITY="granularity=fine,compact,0,0"
57
topology=$1
68
layer_num=$2
79
bs=$3
@@ -39,17 +41,6 @@ if [ ! -d "logs" ]; then
3941
mkdir logs
4042
fi
4143

42-
total_cores=`ls -l /sys/devices/system/cpu/ | grep "cpu[0-9]*$" | wc -l`
43-
online_cores=`cat /sys/devices/system/cpu/cpu*/online | grep -o '1' | wc -l`
44-
if [ $online_cores -eq $total_cores ]; then
45-
echo "Hyper Threading is ON"
46-
export KMP_AFFINITY="granularity=fine,compact,1,0"
47-
else
48-
echo "Hyper Threading is OFF"
49-
export OMP_DYNAMIC="FALSE"
50-
export KMP_AFFINITY="granularity=fine,compact,0,0"
51-
fi
52-
5344
for use_mkldnn in True False; do
5445
for batchsize in 64 128 256; do
5546
train vgg 19 $batchsize $use_mkldnn

0 commit comments

Comments
 (0)