From 6c20e7c4e6b861e76f525ba4f51aa91ade0f1b57 Mon Sep 17 00:00:00 2001 From: silingtong123 <35439432+silingtong123@users.noreply.github.com> Date: Mon, 6 Jan 2020 21:55:18 +0800 Subject: [PATCH] test=develop, remove unused parameter from class RuntimeInferShapeContext constructors (#22046) --- paddle/fluid/framework/operator.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index 46a9c593ba..3ea2019073 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -532,8 +532,7 @@ bool OpSupportGPU(const std::string& op_type) { class RuntimeInferShapeContext : public InferShapeContext { public: - RuntimeInferShapeContext(const OperatorBase& op, const Scope& scope, - const RuntimeContext& ctx) + RuntimeInferShapeContext(const OperatorBase& op, const RuntimeContext& ctx) : op_(op), ctx_(ctx) {} bool HasInput(const std::string& name) const override { @@ -901,7 +900,7 @@ static void CheckTensorNANOrInf(const std::string& op_type, void OperatorWithKernel::RuntimeInferShape(const Scope& scope, const platform::Place& place, const RuntimeContext& ctx) const { - RuntimeInferShapeContext infer_shape_ctx(*this, scope, ctx); + RuntimeInferShapeContext infer_shape_ctx(*this, ctx); this->InferShape(&infer_shape_ctx); } @@ -966,7 +965,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope, } if (!all_kernels_must_compute_runtime_shape_) { - RuntimeInferShapeContext infer_shape_ctx(*this, exec_scope, *runtime_ctx); + RuntimeInferShapeContext infer_shape_ctx(*this, *runtime_ctx); this->InferShape(&infer_shape_ctx); } -- GitLab