Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddle/fluid/framework/ir/runtime_context_cache_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/framework/operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<phi::DenseTensor*>& tensors,
Expand Down Expand Up @@ -1295,7 +1295,7 @@ struct OperatorWithKernel::CacheImpl {
std::vector<phi::DDim> last_ddims_;
};
const char // NOLINT
OperatorWithKernel::CacheImpl::kNotAllowInferShapeCahce[] =
OperatorWithKernel::CacheImpl::kNotAllowInferShapeCache[] =
"@NOT_ALLOW_INFERSHAPE_CACHE@";

static void CheckTensorNANOrInf(const std::string& op_type,
Expand Down Expand Up @@ -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 {
Expand Down