From d8f4f4239d82d66f6a56dd238077f79110601096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Fri, 18 Oct 2019 18:20:42 +0800 Subject: [PATCH] Ensure backward compatibility with the anakin interface, test=develop (#20691) * support MLU nums, test=develop * change anakin apis, test=develop --- paddle/fluid/inference/api/api_anakin_engine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/inference/api/api_anakin_engine.cc b/paddle/fluid/inference/api/api_anakin_engine.cc index 4c51c239f6..cf5b53b51c 100644 --- a/paddle/fluid/inference/api/api_anakin_engine.cc +++ b/paddle/fluid/inference/api/api_anakin_engine.cc @@ -203,7 +203,8 @@ bool PaddleInferenceAnakinPredictor::RunImpl( << "'s type is not float"; } auto d_tensor_p = this->executor_p_->get_in(input.name); - auto net_shape = d_tensor_p->valid_shape(); + // For backward compatibility. + auto net_shape = d_tensor_p->shape(); if (net_shape.size() != input.shape.size()) { LOG(FATAL) << " input " << input.name << "'s shape size should be equal to that of net"; -- GitLab