Skip to content

Commit

Permalink
Merge branch '310_subgraph' of https://github.com/JZZ-NOTE/Paddle int…
Browse files Browse the repository at this point in the history
…o 310_subgraph
  • Loading branch information
JZZ-NOTE committed Sep 16, 2021
2 parents 04eedfd + 36f1de0 commit 9602506
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion paddle/fluid/pybind/inference_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void BindPaddlePlace(py::module *m);
void BindPaddlePredictor(py::module *m);
void BindNativeConfig(py::module *m);
void BindNativePredictor(py::module *m);
void BindLiteNNAdapterConfig(py::module *m);
void BindAnalysisConfig(py::module *m);
void BindAnalysisPredictor(py::module *m);
void BindZeroCopyTensor(py::module *m);
Expand Down Expand Up @@ -303,6 +304,7 @@ void BindInferenceApi(py::module *m) {
BindPaddlePredictor(m);
BindNativeConfig(m);
BindNativePredictor(m);
BindLiteNNAdapterConfig(m);
BindAnalysisConfig(m);
BindAnalysisPredictor(m);
BindPaddleInferPredictor(m);
Expand Down Expand Up @@ -624,7 +626,26 @@ void BindAnalysisConfig(py::module *m) {
[](AnalysisConfig &self) {
return dynamic_cast<PaddlePassBuilder *>(self.pass_builder());
},
py::return_value_policy::reference);
py::return_value_policy::reference)
.def("nnadapter", &AnalysisConfig::NNAdapter);
}

void BindLiteNNAdapterConfig(py::module *m) {
py::class_<LiteNNAdapterConfig> lite_nnadapter_config(*m,
"LiteNNAdapterConfig");

lite_nnadapter_config
.def("set_device_names", &LiteNNAdapterConfig::SetDeviceNames)
.def("set_context_properties", &LiteNNAdapterConfig::SetContextProperties)
.def("set_model_cache_dir", &LiteNNAdapterConfig::SetModelCacheDir)
.def("set_model_cache_buffers",
&LiteNNAdapterConfig::SetModelCacheBuffers)
.def("set_subgraph_partition_config_path",
&LiteNNAdapterConfig::SetSubgraphPartitionConfigPath)
.def("set_subgraph_partition_config_buffer",
&LiteNNAdapterConfig::SetSubgraphPartitionConfigBuffer)
.def("enable", &LiteNNAdapterConfig::Enable)
.def("disable", &LiteNNAdapterConfig::Disable);
}

#ifdef PADDLE_WITH_MKLDNN
Expand Down

1 comment on commit 9602506

@paddle-bot-old
Copy link

@paddle-bot-old paddle-bot-old bot commented on 9602506 Sep 16, 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: #35226 Commit ID: 9602506 contains failed CI.

🔹 Failed: PR-CI-CPU-Py2

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

🔹 Failed: PR-CE-Framework

Unknown Failed
2021-09-17 21:41:52 Makefile:140: recipe for target 'all' failed
2021-09-17 21:41:52 make: *** [all] Error 2
2021-09-17 21:41:52 + build_error=2
2021-09-17 21:41:52 + collect_ccache_hits
2021-09-17 21:41:52 ++ ccache -s
2021-09-17 21:41:52 ++ grep 'cache hit rate'
2021-09-17 21:41:52 ++ awk '{print $4}'
2021-09-17 21:41:52 + rate=78.60
2021-09-17 21:41:52 + echo 'ccache hit rate: 78.60%'
2021-09-17 21:41:52 ccache hit rate: 78.60%
2021-09-17 21:41:52 + echo 'ipipe_log_param_Ccache_Hit_Rate: 78.60%'
2021-09-17 21:41:52 + '[' 2 '!=' 0 ']'
2021-09-17 21:41:52 + exit 7
2021-09-17 21:41:52 + EXCODE=7
2021-09-17 21:41:52 + '[' 7 -eq 0 ']'
2021-09-17 21:41:52 + set +x
2021-09-17 21:41:52 Sorry, build failed.
2021-09-17 21:41:52 + exit 7
2021-09-17 21:41:52 {build code state=7}

🔹 Failed: PR-CI-Coverage

Unknown Failed
2021-09-17 21:48:22 Makefile:140: recipe for target 'all' failed
2021-09-17 21:48:22 make: *** [all] Error 2
2021-09-17 21:48:22 + build_error=2
2021-09-17 21:48:22 + collect_ccache_hits
2021-09-17 21:48:22 ++ ccache -s
2021-09-17 21:48:22 ++ grep 'cache hit rate'
2021-09-17 21:48:22 ++ awk '{print $4}'
2021-09-17 21:48:23 + rate=85.65
2021-09-17 21:48:23 + echo 'ccache hit rate: 85.65%'
2021-09-17 21:48:23 ccache hit rate: 85.65%
2021-09-17 21:48:23 + echo 'ipipe_log_param_Ccache_Hit_Rate: 85.65%'
2021-09-17 21:48:23 + '[' 2 '!=' 0 ']'
2021-09-17 21:48:23 + exit 7
2021-09-17 21:48:23 + EXCODE=7
2021-09-17 21:48:23 + '[' 7 -eq 0 ']'
2021-09-17 21:48:23 + set +x
2021-09-17 21:48:23 Sorry, build failed.
2021-09-17 21:48:23 + exit 7
2021-09-17 21:48:23 {build code state=7}

🔹 Failed: PR-CI-NPU

Unknown Failed
2021-09-18 00:01:31 + set +x
2021-09-18 00:01:31 + SOURCE=/paddle/build/coverage-diff
2021-09-18 00:01:31 + [[ -d /paddle/build/coverage-diff ]]
2021-09-18 00:01:31 + [[ -f /paddle/build/coverage-diff ]]
2021-09-18 00:01:31 + echo 'No such file or directory: /paddle/build/coverage-diff'
2021-09-18 00:01:31 No such file or directory: /paddle/build/coverage-diff
2021-09-18 00:01:31 + exit 0
2021-09-18 00:01:31 report uploaded
2021-09-18 00:01:31 ===================================================================
2021-09-18 00:01:31 c++-coverage
2021-09-18 00:01:31 https://xly.bce.baidu.com/ipipe/ipipe-report/report/7583215/c++-coverage/
2021-09-18 00:01:31 ===================================================================
2021-09-18 00:01:31 + [[ 7 -eq 0 ]]
2021-09-18 00:01:31 + [[ 7 -eq 4 ]]
2021-09-18 00:01:31 + [[ 7 -eq 6 ]]
2021-09-18 00:01:31 + [[ 7 -eq 7 ]]
2021-09-18 00:01:31 Sorry, build failed.
2021-09-18 00:01:31 + echo 'Sorry, build failed.'
2021-09-18 00:01:31 + exit 7

Please sign in to comment.