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

model_benchmark #32600

Merged
merged 22 commits into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions tools/test_model_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@
# limitations under the License.


function check_whl {
bash -x paddle/scripts/paddle_build.sh build
[ $? -ne 0 ] && echo "build paddle failed." && exit 1
pip uninstall -y paddlepaddle_gpu
pip install build/python/dist/*.whl
[ $? -ne 0 ] && echo "install paddle failed." && exit 1

mkdir -p /tmp/pr && mkdir -p /tmp/develop
unzip -q build/python/dist/*.whl -d /tmp/pr

git checkout .
git checkout -b develop_base_pr upstream/$BRANCH
cd build
make -j `nproc`
unzip -q python/dist/*.whl -d /tmp/develop

sed -i '/version.py/d' /tmp/pr/*/RECORD
sed -i '/version.py/d' /tmp/develop/*/RECORD
diff_whl=`diff /tmp/pr/*/RECORD /tmp/develop/*/RECORD|wc -l`
if [ ${diff_whl} -eq 0 ];then
echo "paddle whl does not diff in PR-CI-Model-benchmark, so skip this ci"
exit 0
fi
}

function compile_install_paddle {
export CUDA_ARCH_NAME=Auto
export PY_VERSION=3.7
Expand All @@ -23,11 +48,7 @@ function compile_install_paddle {
export WITH_TENSORRT=OFF
export WITH_TESTING=OFF
export WITH_UNITY_BUILD=ON
bash -x paddle/scripts/paddle_build.sh build
[ $? -ne 0 ] && echo "build paddle failed." && exit 1
pip uninstall -y paddlepaddle_gpu
pip install build/python/dist/paddlepaddle_gpu-0.0.0-cp37-cp37m-linux_x86_64.whl
[ $? -ne 0 ] && echo "install paddle failed." && exit 1
check_whl
}

function prepare_data {
Expand Down