From b17eafe3dbf2dbf0a0f921d8941445425d2fae26 Mon Sep 17 00:00:00 2001 From: zhaozhixuan Date: Wed, 16 Jun 2021 21:52:13 +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 e8ccd416..002e07ab 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 GetSkipInferShape() const { return skip_infershape_; } + bool SkipInferShape() 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 96959b80..753818bc 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.GetSkipInferShape()) { + if (!node_state.SkipInferShape()) { 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());