Skip to content

Commit

Permalink
Merge pull request #6 from jiweibo/310_subgraph
Browse files Browse the repository at this point in the history
ci coverage
  • Loading branch information
JZZ-NOTE authored Sep 20, 2021
2 parents 4272e9f + 6ed50e4 commit d85e499
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
9 changes: 1 addition & 8 deletions paddle/fluid/inference/api/analysis_predictor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,8 @@ bool AnalysisPredictor::CreateExecutor() {
#endif
} else if (config_.NNAdapter().use_nnadapter) {
if (config_.lite_engine_enabled()) {
#ifdef LITE_SUBGRAPH_WITH_NNADAPTER
// Currently, Paddle-Lite's NNAdapter user interface only supports the
// transfer
// of Host data pointers. If it is currently used as a subgraph, execution
// efficiency will be sacrificed, so it is temporarily set to cpu place.
// And, the current lite engine of xpu must execute all parts of the
// model.
place_ = paddle::platform::CPUPlace();
#else
#ifndef LITE_SUBGRAPH_WITH_NNADAPTER
PADDLE_THROW(
platform::errors::Unavailable("You tried to use an NNAdapter lite "
"engine, but Paddle was not compiled "
Expand Down
18 changes: 18 additions & 0 deletions paddle/fluid/inference/api/analysis_predictor_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ TEST(AnalysisPredictor, analysis_off) {
ASSERT_TRUE(predictor->Run(inputs, &outputs));
}

TEST(AnalysisPredictor, lite_nn_adapter_npu) {
AnalysisConfig config;
config.SetModel(FLAGS_dirname);
config.EnableLiteEngine();
config.NNAdapter()
.Disable()
.Enable()
.SetDeviceNames({"huawei_ascend_npu"})
.SetContextProperties("HUAWEI_ASCEND_NPU_SELECTED_DEVICE_IDS=0")
.SetModelCacheDir("cache_dirr")
.SetSubgraphPartitionConfigPath("")
.SetModelCacheBuffers("c1", {'c'});
#ifndef LITE_SUBGRAPH_WITH_NNADAPTER
EXPECT_THROW(CreatePaddlePredictor<AnalysisConfig>(config),
paddle::platform::EnforceNotMet);
#endif
}

TEST(AnalysisPredictor, analysis_on) {
AnalysisConfig config;
config.SetModel(FLAGS_dirname);
Expand Down

1 comment on commit d85e499

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on d85e499 Sep 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵️ CI failures summary

🔍 PR: #6 Commit ID: d85e499 contains failed CI.

🔹 Failed: PR-CI-CPU-Py2

approve_failed
2021-09-20 13:04:03 1. You must have one RD (XiaoguangHu01 or lanxianghit) approval for API change.
2021-09-20 13:04:03 and one TPM approval for API change:
2021-09-20 13:04:03 jzhang533/ZhangJun, dingjiaweiww/DingJiaWei, Heeenrrry/LiKunLun, TCChenlong/ChenLong for general APIs
2021-09-20 13:04:03 PangHua/XiangHui for distributed related APIs
2021-09-20 13:04:03 twismon/WangYunKai, CheQiXiao/CheQiXiao for inference related APIs.
2021-09-20 13:04:03 2. You must have one TPM approval for API documents change:
2021-09-20 13:04:03 jzhang533/ZhangJun, dingjiaweiww/DingJiaWei, Heeenrrry/LiKunLun, TCChenlong/ChenLong for general API docs
2021-09-20 13:04:03 PangHua/XiangHui for distributed related API docs
2021-09-20 13:04:03 twismon/WangYunKai, CheQiXiao/CheQiXiao for inference related API docs.
2021-09-20 13:04:03
2021-09-20 13:04:03 There are 3 approved errors.
2021-09-20 13:04:03 ****************
2021-09-20 13:04:03 API Difference is:
2021-09-20 13:04:03 + paddle.inference.Config.nnadapter (ArgSpec(), ('document', 'b531e2e889aabc6071e44937f4196bf5'))
2021-09-20 13:04:03 + approval_error=6
2021-09-20 13:04:03 + '[' 6 '!=' 0 ']'
2021-09-20 13:04:03 + exit 6
2021-09-20 13:04:03 + EXCODE=6
2021-09-20 13:04:03 + echo 'EXCODE: 6'
2021-09-20 13:04:03 EXCODE: 6
2021-09-20 13:04:03 + echo 'ipipe_log_param_EXCODE: 6'

🔹 Failed: PR-CI-Windows

test_failed
2021-09-20 13:58:00 The following tests FAILED:
2021-09-20 13:58:00 194 - test_analysis_predictor (Failed)
2021-09-20 13:58:00 194 - test_analysis_predictor (Failed)
2021-09-20 13:58:00 194 - test_analysis_predictor (Failed)
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>goto:eof
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>for /F %# in ('wmic os get localdatetime|findstr 20') do set end=%#
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>set end=20210920135800.402000+480
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>set end=0920135800
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>call :timestamp "0920125327" "0920135800" "1 card TestCases Total"
2021-09-20 13:58:00 C:\Users\Administrator\Downloads\workspace\ddadf1bb-047a-4d34-bfa4-c46b2b760970\Paddle\build>setlocal enabledelayedexpansion
2021-09-20 13:58:00 1774407
2021-09-20 13:58:00 "Windows 1 card TestCases Total Time: 3873s"
2021-09-20 13:58:00 ipipe_log_param_Windows_1_card_TestCases_Total_Time: 3873s
2021-09-20 13:58:00 1774407
2021-09-20 13:58:00 "Windows TestCases Total Time: 3873s"
2021-09-20 13:58:00 ipipe_log_param_Windows_TestCases_Total_Time: 3873s
2021-09-20 13:58:00 Running unit tests failed, will exit
2021-09-20 13:58:08 EXCODE: 8

🔹 Failed: PR-CI-Coverage

coverage_failed
2021-09-20 14:02:01 + UPLOAD_PATH=python-coverage
2021-09-20 14:02:01 + CURL_OPTS='-s --connect-timeout 600 --retry 10 --retry-delay 10'
2021-09-20 14:02:01 ++ uuid
2021-09-20 14:02:01 ++ curl -s --connect-timeout 600 --retry 10 --retry-delay 10 -u paddle:915eedab953b6f51151f50eb https://xly.bce.baidu.com/ipipe/ipipe-report/uuid
2021-09-20 14:02:02 + UPLOAD_FILE=/tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz
2021-09-20 14:02:02 + echo Archiving
2021-09-20 14:02:02 Archiving
2021-09-20 14:02:02 + tar -czvf /tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz .
2021-09-20 14:02:02 ./
2021-09-20 14:02:02 + du -hs /tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz
2021-09-20 14:02:02 4.0K /tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz
2021-09-20 14:02:02 + curl -s --connect-timeout 600 --retry 10 --retry-delay 10 -u paddle:915eedab953b6f51151f50eb -F buildId=7651781 -F path=python-coverage -F file=@/tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz https://xly.bce.baidu.com/ipipe/ipipe-report/upload
2021-09-20 14:02:02 + rm -f /tmp/upload-8abeb2ac-0c1c-4199-84ed-60cabb37738f.tar.gz
2021-09-20 14:02:02 report uploaded
2021-09-20 14:02:02 9
2021-09-20 14:02:02 ipipe_log_param_EXCODE: 9
2021-09-20 14:02:02 Sorry, coverage check failed.
2021-09-20 14:02:02 + exit 9
2021-09-20 14:02:02 {build code state=9}

Please sign in to comment.