From 83310a1c14edb271050cdedaae936badc69b7422 Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Wed, 27 Sep 2017 17:00:49 +0800 Subject: [PATCH] refine mkldnn benchmark script --- benchmark/paddle/image/run_mkldnn.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/benchmark/paddle/image/run_mkldnn.sh b/benchmark/paddle/image/run_mkldnn.sh index b6cd6fe03b..81de1a0e91 100755 --- a/benchmark/paddle/image/run_mkldnn.sh +++ b/benchmark/paddle/image/run_mkldnn.sh @@ -13,9 +13,13 @@ function train() { log="logs/${topology}-mkldnn-${bs}.log" elif [ $3 == "False" ]; then thread=`nproc` + # each trainer_count use only 1 core to avoid conflict + export OMP_NUM_THREADS=1 + export MKL_NUM_THREADS=1 log="logs/${topology}-${thread}mklml-${bs}.log" else echo "Wrong input $3, use True or False." + exit 0 fi args="batch_size=${bs}" config="${topology}.py" -- GitLab