File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 2
2
3
3
function train() {
4
4
unset OMP_NUM_THREADS MKL_NUM_THREADS
5
+ export OMP_DYNAMIC=" FALSE"
6
+ export KMP_AFFINITY=" granularity=fine,compact,0,0"
5
7
topology=$1
6
8
layer_num=$2
7
9
bs=$3
@@ -39,17 +41,6 @@ if [ ! -d "logs" ]; then
39
41
mkdir logs
40
42
fi
41
43
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
-
53
44
for use_mkldnn in True False; do
54
45
for batchsize in 64 128 256; do
55
46
train vgg 19 $batchsize $use_mkldnn
You can’t perform that action at this time.
0 commit comments