[INTEL MK] Updating MKL CPU CI build and test. (#18513)
authorAG Ramesh <ag.ramesh@intel.com>
Tue, 17 Apr 2018 23:43:53 +0000 (16:43 -0700)
committerJonathan Hseu <vomjom@vomjom.net>
Tue, 17 Apr 2018 23:43:53 +0000 (16:43 -0700)
* Setting  KMP_BLOCKTIME to 0

* Adding comments

tensorflow/tools/ci_build/linux/cpu/run_mkl.sh

index dbf376b..2a9f295 100755 (executable)
@@ -30,7 +30,10 @@ export PYTHON_BIN_PATH=`which python2`
 yes "" | $PYTHON_BIN_PATH configure.py
 
 # Run bazel test command. Double test timeouts to avoid flakes.
+# Setting KMP_BLOCKTIME to 0 lets OpenMP threads to sleep right after parallel execution
+# in an MKL primitive. This reduces the effects of an oversubscription of OpenMP threads
+# caused by executing multiple tests concurrently.
 bazel test --test_tag_filters=-no_oss,-oss_serial,-gpu,-benchmark-test --test_lang_filters=py -k \
     --jobs=${N_JOBS} --test_timeout 300,450,1200,3600 --build_tests_only \
-    --config=mkl --config=opt --test_output=errors -- \
+    --config=mkl --test_env=KMP_BLOCKTIME=0 --config=opt --test_output=errors -- \
     //tensorflow/... -//tensorflow/compiler/... -//tensorflow/contrib/...