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

at least set threads number as 1, in case trainers number is larger than processors

上级 4fbba656
...@@ -80,6 +80,9 @@ function threads_config() { ...@@ -80,6 +80,9 @@ function threads_config() {
trainers=1 trainers=1
fi fi
threads=$((processors / trainers)) threads=$((processors / trainers))
if [ $threads -eq 0 ]; then
threads=1
fi
if [ -z "$OMP_NUM_THREADS" ]; then if [ -z "$OMP_NUM_THREADS" ]; then
export OMP_NUM_THREADS=$threads export OMP_NUM_THREADS=$threads
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册