From df6c442031e7a4e22254e073c6e4cd5fb34c956c Mon Sep 17 00:00:00 2001 From: JiaoPu <540777455@qq.com> Date: Tue, 2 Jun 2020 16:07:42 +0800 Subject: [PATCH] Fix CI test (#93) 1 Fix CI test 2 refactor: reduce hwtime log to ease analyzing for CI subgraph will rebuild while batchsize changable is on and encounter a unsupported operator. graph will be destructed and recreated, in which Nan hw perf log is printed 3 fix googlenet gtest check --- .github/workflows/github-CI.yml | 59 ++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/.github/workflows/github-CI.yml b/.github/workflows/github-CI.yml index c5cbeef61e..b156275918 100644 --- a/.github/workflows/github-CI.yml +++ b/.github/workflows/github-CI.yml @@ -8,6 +8,7 @@ jobs: build: env: NEUWARE_HOME: /usr/local/neuware + LD_LIBRARY_PATH: "/home/jiaopu/actions-runner/_work/Paddle-Lite/Paddle-Lite/build.lite.mlu/third_party/mklml/src/extern_mklml/lib:/usr/local/neuware/lib64" runs-on: self-hosted @@ -51,26 +52,60 @@ jobs: run: ./build.lite.mlu/lite/kernels/mlu/bridges/test_lrn_converter_mlu - name: test_gather_converter_mlu run: ./build.lite.mlu/lite/kernels/mlu/bridges/test_gather_converter_mlu - - name: test_classification + - name: test_classification_resnet50 run: | cd .. rm -rf Paddle-Lite-models - git clone -b develop git@github.com:Cambricon/Paddle-Lite-models.git + git clone -b gtest git@github.com:Cambricon/Paddle-Lite-models.git cd Paddle-Lite-models sed -i 's/\/home\/dingminghui\/paddle/${PWD}\/../' prepare_paddle_env.sh - sed -i 's/\/home\/dingminghui\/paddle\/data/\/opt\/share\/paddle_model\//' classification/classification_demo.cpp cp /opt/share/datasets/imagenet/val_1000.txt classification/filelist sed -i 's/^/\/opt\/share\/datasets\/imagenet\//' classification/filelist - LD_LIBRARY_PATH=${PWD}/../Paddle-Lite/build.lite.mlu/third_party/mklml/src/extern_mklml/lib ./prepare_paddle_env.sh 0 + ./prepare_paddle_env.sh 0 cd classification - LD_LIBRARY_PATH=${PWD}/../../Paddle-Lite/build.lite.mlu/third_party/mklml/src/extern_mklml/lib ./classification_demo 1 &> log - - name: compare_subgraph_num + ./classification_demo --gtest_filter="classification_test.resnet50" &> log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6 log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6 log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6 log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6b)?"0":"1"}'` -eq 0 ] - tmp=`awk '/top5/ {print $5}' ${PWD}/../Paddle-Lite-models/classification/log` && [ `awk -v a=$tmp -v b=0.9 'BEGIN{print(a>b)?"0":"1"}'` -eq 0 ] + cd /home/jiaopu/actions-runner/_work/Paddle-Lite/Paddle-Lite-models/classification + ./classification_demo --gtest_filter="classification_test.googlenet_KL" &> log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6 log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6 log + [ `awk 'BEGIN {min=65536} /detected.*subgraph/ {if($6max) max=$7 fi} END {print max}' log` && [ `awk -v a=$hardware_time -v b=8 'BEGIN{print(a