未验证 提交 8e76e305 编写于 作者: H hong19860320 提交者: GitHub

[APU] Fix the generation of the APU DLA model (#4064)

test=develop
上级 c2150d11
...@@ -29,6 +29,10 @@ namespace kernels { ...@@ -29,6 +29,10 @@ namespace kernels {
namespace apu { namespace apu {
bool SubgraphEngine::BuildDeviceProgram() { bool SubgraphEngine::BuildDeviceProgram() {
if (!origin_program_) {
BuildOriginProgram();
}
unsigned int version; unsigned int version;
Neuron_getVersion(&version); Neuron_getVersion(&version);
VLOG(3) << "Neuron Adapter version: " << version; VLOG(3) << "Neuron Adapter version: " << version;
...@@ -46,9 +50,6 @@ bool SubgraphEngine::BuildDeviceProgram() { ...@@ -46,9 +50,6 @@ bool SubgraphEngine::BuildDeviceProgram() {
// Convert all of ops and their input vars and weights and added into the APU // Convert all of ops and their input vars and weights and added into the APU
// NIR graph // NIR graph
if (!origin_program_) {
BuildOriginProgram();
}
const auto& bridges = subgraph::Registry::Instance(); const auto& bridges = subgraph::Registry::Instance();
const auto& insts = origin_program_->instructions(kRootBlockIdx); const auto& insts = origin_program_->instructions(kRootBlockIdx);
for (auto& inst : insts) { for (auto& inst : insts) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册