From ea2dee68136c0e9045c0a73f4c5e43cca44de11c Mon Sep 17 00:00:00 2001 From: zhupengyang <1165938320@qq.com> Date: Mon, 25 May 2020 13:21:31 +0800 Subject: [PATCH] [NPU] remove empty shape (#3687) --- lite/kernels/npu/subgraph_compute.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lite/kernels/npu/subgraph_compute.cc b/lite/kernels/npu/subgraph_compute.cc index 101cd65e8b..a18d5314fd 100644 --- a/lite/kernels/npu/subgraph_compute.cc +++ b/lite/kernels/npu/subgraph_compute.cc @@ -120,7 +120,9 @@ int SubgraphEngine::BuildDeviceProgram() { return subgraph::FAILED; } auto device_program = std::make_shared(device_client); - device_program_map_[inputs_shape_] = device_program; + if (!inputs_shape_.empty()) { + device_program_map_[inputs_shape_] = device_program; + } // Query and check the dimensions of valid input and output tensors std::vector device_idims, device_odims; -- GitLab