Skip to content

Commit

Permalink
fix typo subsituted
Browse files Browse the repository at this point in the history
  • Loading branch information
Liyulingyue committed Jan 31, 2025
1 parent 138c1cb commit 898b273
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
6 changes: 0 additions & 6 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ stragety = 'stragety'
strem = 'strem'
structed = 'structed'
sturcture = 'sturcture'
subsituted = 'subsituted'
subsitute = 'subsitute'
substitude = 'substitude'
substitue = 'substitue'
Subsitute = 'Subsitute'
Substitude = 'Substitude'
substract = 'substract'
Substract = 'Substract'
successed = 'successed'
Expand Down
4 changes: 2 additions & 2 deletions paddle/cinn/hlir/framework/pir/trivial_op_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ir::Expr GetComputeBody(const FusibleOp& op) {
const auto& compute_body =
(ExprSetFinderUtils::ChildStores * ExprSetFinderUtils::Store2Value)
.GetSingle(compute_realize);
return ExprTransformerUtils::SubstitudeByScheduleBlockRealize(
return ExprTransformerUtils::SubstituteByScheduleBlockRealize(
compute_realize)(compute_body);
}
ir::Expr operator()(const TrivialOp& op) {
Expand All @@ -102,7 +102,7 @@ ir::Expr GetComputeBody(const FusibleOp& op) {
const auto& compute_body =
(ExprSetFinderUtils::ChildStores * ExprSetFinderUtils::Store2Value)
.GetSingle(compute_realize);
return ExprTransformerUtils::SubstitudeByScheduleBlockRealize(
return ExprTransformerUtils::SubstituteByScheduleBlockRealize(
compute_realize)(compute_body);
}
};
Expand Down
6 changes: 3 additions & 3 deletions paddle/cinn/hlir/framework/pir/trivial_op_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ ir::Expr CopiedReplaceExpr(const Expr& source,
return copied_source;
}

void SubstitudeTargetExprWithDestExpr(const ir::Expr& source,
void SubstituteTargetExprWithDestExpr(const ir::Expr& source,
const ir::Expr& dest,
ir::Expr* body) {
VLOG(4) << "SubstitideExpr Start";
Expand All @@ -193,7 +193,7 @@ void SubstitudeTargetExprWithDestExpr(const ir::Expr& source,
VLOG(5) << "SubstitideExpr Result: " << *body;
}

ir::Expr SubstitudeIndexVector(const Expr& source,
ir::Expr SubstituteIndexVector(const Expr& source,
const std::vector<Var>& load_vars,
const std::vector<ir::Expr>& indices) {
return CopiedReplaceExpr(source, load_vars, indices);
Expand Down Expand Up @@ -623,7 +623,7 @@ ExprTransformer WrapReduceOperation(const ir::Reduce::ReduceType& reduce_type,
return ExprTransformer(f);
}

ExprTransformer SubstitudeByScheduleBlockRealize(const ir::Expr& realize) {
ExprTransformer SubstituteByScheduleBlockRealize(const ir::Expr& realize) {
const auto& f = [=](const ir::Expr& e) -> ir::Expr {
const auto& iter_values =
realize.As<ir::ScheduleBlockRealize>()->iter_values;
Expand Down
10 changes: 5 additions & 5 deletions paddle/cinn/hlir/framework/pir/trivial_op_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ bool CheckIterEq(const std::vector<ir::Var>& up_iter,
ir::Expr CopiedReplaceExpr(const Expr& source,
const std::vector<Var>& replaced,
const std::vector<Expr>& candidates);
void SubstitudeTargetExprWithDestExpr(const ir::Expr& source,
void SubstituteTargetExprWithDestExpr(const ir::Expr& source,
const ir::Expr& dest,
ir::Expr* body);

ir::Expr SubstitudeIndexVector(const Expr& source,
ir::Expr SubstituteIndexVector(const Expr& source,
const std::vector<Var>& load_vars,
const std::vector<ir::Expr>& indices);

Expand All @@ -104,9 +104,9 @@ void ReplaceDownstreamLoadExprWithUpstreamComputeBody(
const FusionOp& upstream,
const ir::Expr& downstream_load_expr,
ir::Expr* downstream_body) {
ComposeUtils::SubstitudeTargetExprWithDestExpr(
ComposeUtils::SubstituteTargetExprWithDestExpr(
downstream_load_expr,
ComposeUtils::SubstitudeIndexVector(
ComposeUtils::SubstituteIndexVector(
GetComputeBody(upstream),
GetOutputIters(upstream),
downstream_load_expr.As<ir::Load>()->indices),
Expand Down Expand Up @@ -249,7 +249,7 @@ ExprTransformer UnsqueezeForTransformer(
const ExprSetFinderUtils::ExprSetFinder& followed_finder,
const ir::Var& to_append_var);

ExprTransformer SubstitudeByScheduleBlockRealize(const ir::Expr& realize);
ExprTransformer SubstituteByScheduleBlockRealize(const ir::Expr& realize);

ExprTransformer WrapScheduleRealizer(const std::vector<ir::Var>& block_vars,
const std::string& tensor_name);
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/pass_desc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ syntax = "proto2";
import "paddle/fluid/framework/framework.proto";
package paddle.framework.proto;

// Describes one subsitute subgraph.
// Describes one substitute subgraph.
message PassDesc {
enum RoleType {
kVariable = 0;
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/core/framework/pass_desc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ syntax = "proto2";
import "paddle/phi/core/framework/framework.proto";
package paddle.framework.proto;

// Describes one subsitute subgraph.
// Describes one substitute subgraph.
message PassDesc {
enum RoleType {
kVariable = 0;
Expand Down

0 comments on commit 898b273

Please sign in to comment.