Skip to content

Commit 40b2a03

Browse files
[cherry-pick 32784] Fix distro (#33638)
cherry-pick 32784
1 parent 8e163f9 commit 40b2a03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ function cmake_base() {
248248
distibuted_flag=${WITH_DISTRIBUTE:-OFF}
249249
gloo_flag=${distibuted_flag}
250250

251+
if [ "$CMD" != "assert_file_approvals" ];then
252+
python -m pip install distro
253+
python ${PADDLE_ROOT}/tools/summary_env.py
254+
bash ${PADDLE_ROOT}/tools/get_cpu_info.sh
255+
fi
256+
251257
cat <<EOF
252258
========================================
253259
Configuring cmake in /paddle/build ...
@@ -1910,10 +1916,6 @@ function main() {
19101916
local CMD=$1
19111917
local parallel_number=$2
19121918
init
1913-
if [ "$CMD" != "assert_file_approvals" ];then
1914-
python ${PADDLE_ROOT}/tools/summary_env.py
1915-
bash ${PADDLE_ROOT}/tools/get_cpu_info.sh
1916-
fi
19171919
case $CMD in
19181920
build_only)
19191921
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}

0 commit comments

Comments
 (0)