未验证 提交 89d573e1 编写于 作者: S Santa An 提交者: GitHub

[LITE][BM] fix input name not in graph issue,test=develop (#3985)

* [LITE][BM] modify interpolate if,test=develop

* [LITE][BM] compiler opt=1 to opt=2, test=develop
上级 4db9f3a5
......@@ -34,6 +34,9 @@ bool SubgraphEngine::BuildDeviceProgram() {
const auto& bridges = subgraph::Registry::Instance();
graph.CreateCompilerHandle();
auto& ctx = this->ctx_->template As<BMContext>();
for (size_t i = 0; i < input_names_.size(); i++) {
graph.AddNode(input_names_[i]);
}
if (!origin_program_) {
BuildOriginProgram();
}
......@@ -60,7 +63,7 @@ bool SubgraphEngine::BuildDeviceProgram() {
std::string net_name = "bmnet_f32bmodel";
auto unique_net_name = lite::subgraph::bm::UniqueName(net_name);
__bmcompile_opt(
graph.GetCompilerHandle(), const_cast<char*>(unique_net_name.c_str()), 2);
graph.GetCompilerHandle(), const_cast<char*>(unique_net_name.c_str()), 1);
void* bmodel_data = nullptr;
unsigned int data_size = 0;
bm_hd_ = static_cast<bm_handle_t>(ctx.GetHandle());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册