Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update benchmark-cpu #34538

Merged
merged 14 commits into from
Aug 4, 2021
8 changes: 4 additions & 4 deletions tools/test_ci_model_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ function check_whl {
[ $? -ne 0 ] && echo "build paddle failed." && exit 1
pip uninstall -y paddlepaddle_gpu
pip install build/python/dist/*.whl
mkdir build/pr_whl && cp build/python/dist/*.whl build/pr_whl
[ $? -ne 0 ] && echo "install paddle failed." && exit 1

mkdir build/pr_whl && cp build/python/dist/*.whl build/pr_whl
mkdir -p /tmp/pr && mkdir -p /tmp/develop
unzip -q build/python/dist/*.whl -d /tmp/pr
rm -f build/python/dist/*.whl && rm -f build/python/build/.timestamp

git checkout .
git checkout -b develop_base_pr upstream/$BRANCH
bash -x paddle/scripts/paddle_build.sh build
[ $? -ne 0 ] && echo "install paddle failed." && exit 1
cd build
make -j `nproc`
unzip -q python/dist/*.whl -d /tmp/develop

sed -i '/version.py/d' /tmp/pr/*/RECORD
Expand All @@ -40,14 +39,15 @@ function check_whl {
if [ ${diff_whl} -eq 0 ];then
echo "paddle whl does not diff in PR-CI-Model-benchmark, so skip this ci"
echo "ipipe_log_param_isSkipTest_model_benchmark: 1"
echo "cpu_benchmark=ON" >${cfs_dir}/model_benchmark/${AGILE_PULL_ID}/${AGILE_REVISION}/pass.txt
exit 0
else
echo "ipipe_log_param_isSkipTest_model_benchmark: 0"
fi
}

function compile_install_paddle {
export CUDA_ARCH_NAME=Auto
export CUDA_ARCH_NAME=${CUDA_ARCH_NAME:-Auto}
export PY_VERSION=3.7
export WITH_DISTRIBUTE=OFF
export WITH_GPU=ON
Expand Down