From 4bc0f6f2af291635ec162cea483c1974b8976d35 Mon Sep 17 00:00:00 2001 From: zhaozhixuan Date: Wed, 16 Jun 2021 22:00:50 +0800 Subject: [PATCH] Fix bug. --- ge/hybrid/executor/node_state.h | 2 +- ge/hybrid/executor/worker/shape_inference_engine.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/hybrid/executor/node_state.h b/ge/hybrid/executor/node_state.h index 002e07ab..b80b60b0 100644 --- a/ge/hybrid/executor/node_state.h +++ b/ge/hybrid/executor/node_state.h @@ -179,7 +179,7 @@ struct NodeState { void SetSkipInferShape(bool skip_infershape) { skip_infershape_ = skip_infershape; } - bool SkipInferShape() const { return skip_infershape_; } + bool MaySkipShapeInference() const { return skip_infershape_; } private: bool IsScheduleReady() const; diff --git a/ge/hybrid/executor/worker/shape_inference_engine.cc b/ge/hybrid/executor/worker/shape_inference_engine.cc index 753818bc..50dc389c 100755 --- a/ge/hybrid/executor/worker/shape_inference_engine.cc +++ b/ge/hybrid/executor/worker/shape_inference_engine.cc @@ -70,7 +70,7 @@ Status ShapeInferenceEngine::InferShape(NodeState &node_state) { // Do shape inference // Skipping infer shape of input node. GELOGD("[%s] Start to invoke InferShapeAndType", node_item.NodeName().c_str()); - if (!node_state.SkipInferShape()) { + if (!node_state.MaySkipShapeInference()) { RECORD_SHAPE_INFERENCE_EVENT(execution_context_, node_item.NodeName().c_str(), "[InferShapeAndType] Start"); GE_CHK_STATUS_RET(ShapeRefiner::InferShapeAndTypeForRunning(node_item.node, true), "[Invoke][InferShapeAndType] for %s failed.", node_item.NodeName().c_str());