diff --git a/paddle/fluid/framework/ir/runtime_context_cache_pass.cc b/paddle/fluid/framework/ir/runtime_context_cache_pass.cc index e4d73975230e27..408d21d645db41 100644 --- a/paddle/fluid/framework/ir/runtime_context_cache_pass.cc +++ b/paddle/fluid/framework/ir/runtime_context_cache_pass.cc @@ -22,7 +22,7 @@ namespace framework { namespace ir { void RuntimeContextCachePass::ApplyImpl(ir::Graph* graph) const { - static constexpr char kNotAllowInferShapeCahce[] = // NOLINT + static constexpr char kNotAllowInferShapeCache[] = // NOLINT "@NOT_ALLOW_INFERSHAPE_CACHE@"; VLOG(3) << "Applies Runtime Context Cache strategy."; for (const Node* n : graph->Nodes()) { @@ -42,7 +42,7 @@ void RuntimeContextCachePass::ApplyImpl(ir::Graph* graph) const { for (auto& it : var2ops) { if (it.second.size() > 1) { for (auto op_node : it.second) { - op_node->Op()->SetAttr(kNotAllowInferShapeCahce, true); + op_node->Op()->SetAttr(kNotAllowInferShapeCache, true); } } } diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index d731dd4b2086b4..22c9532880e48b 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -1248,7 +1248,7 @@ bool OpSupportGPU(const std::string& op_type) { } struct OperatorWithKernel::CacheImpl { - static const char kNotAllowInferShapeCahce[]; // NOLINT + static const char kNotAllowInferShapeCache[]; // NOLINT explicit CacheImpl(phi::KernelContext* kernel_ctx, RuntimeInferShapeContext* infer_shape_ctx, const std::vector& tensors, @@ -1295,7 +1295,7 @@ struct OperatorWithKernel::CacheImpl { std::vector last_ddims_; }; const char // NOLINT - OperatorWithKernel::CacheImpl::kNotAllowInferShapeCahce[] = + OperatorWithKernel::CacheImpl::kNotAllowInferShapeCache[] = "@NOT_ALLOW_INFERSHAPE_CACHE@"; static void CheckTensorNANOrInf(const std::string& op_type, @@ -2061,7 +2061,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope, new phi::KernelContext(), new RuntimeInferShapeContext(*this, *runtime_ctx), tensors, - HasAttr(CacheImpl::kNotAllowInferShapeCahce)); + HasAttr(CacheImpl::kNotAllowInferShapeCache)); BuildPhiKernelContext(*runtime_ctx, dev_ctx, impl_->getKernelContext()); (*phi_kernel_)(impl_->getKernelContext()); } else {