提交 2dff98ca 编写于 作者: T tensor-tang

remove auto setting from HT, since it's hard to unify with MacOS

上级 714fa9e3
...@@ -2,6 +2,8 @@ set -e ...@@ -2,6 +2,8 @@ set -e
function train() { function train() {
unset OMP_NUM_THREADS MKL_NUM_THREADS unset OMP_NUM_THREADS MKL_NUM_THREADS
export OMP_DYNAMIC="FALSE"
export KMP_AFFINITY="granularity=fine,compact,0,0"
topology=$1 topology=$1
layer_num=$2 layer_num=$2
bs=$3 bs=$3
...@@ -39,17 +41,6 @@ if [ ! -d "logs" ]; then ...@@ -39,17 +41,6 @@ if [ ! -d "logs" ]; then
mkdir logs mkdir logs
fi fi
total_cores=`ls -l /sys/devices/system/cpu/ | grep "cpu[0-9]*$" | wc -l`
online_cores=`cat /sys/devices/system/cpu/cpu*/online | grep -o '1' | wc -l`
if [ $online_cores -eq $total_cores ]; then
echo "Hyper Threading is ON"
export KMP_AFFINITY="granularity=fine,compact,1,0"
else
echo "Hyper Threading is OFF"
export OMP_DYNAMIC="FALSE"
export KMP_AFFINITY="granularity=fine,compact,0,0"
fi
for use_mkldnn in True False; do for use_mkldnn in True False; do
for batchsize in 64 128 256; do for batchsize in 64 128 256; do
train vgg 19 $batchsize $use_mkldnn train vgg 19 $batchsize $use_mkldnn
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册