!9921 Specify a maxinmum number of OpenBLAS threads

From: @ouwenchang
Reviewed-by: @lilongfei15,@wangyue01
Signed-off-by: @wangyue01
This commit is contained in:
mindspore-ci-bot 2020-12-15 14:33:59 +08:00 committed by Gitee
commit 6be16e1cdc
1 changed files with 10 additions and 0 deletions

View File

@ -31,6 +31,16 @@ except ValueError:
import multiprocessing as ctx
# Environment variables are used to specify a maximum number of OpenBLAS threads:
# In ubuntu(GPU) environment, numpy will use too many threads for computing,
# it may affect the start of the summary process.
# Notice: At present, the performance of setting the thread to 2 has been tested to be more suitable.
# If it is to be adjusted, it is recommended to test according to the scenario first
os.environ['OPENBLAS_NUM_THREADS'] = '2'
os.environ['GOTO_NUM_THREADS'] = '2'
os.environ['OMP_NUM_THREADS'] = '2'
def _pack_data(datadict, wall_time):
"""Pack data according to which plugin."""
result, summaries, step = [], [], None