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/cinn/ir/schedule/schedule_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace ir {
// records all transform/getting operations executed by a corresponding
// ir::IRSchedule. A ScheduleDesc can be serialized to JSON format and saved to
// file. For deserializing, it can be re-applied to a new IRSchedule that is
// initialzied by a semantics-euqal original ir::ModuleExpr, and then achieves
// initialzied by a semantics-equal original ir::ModuleExpr, and then achieves
// the same result.

class IRSchedule; // forward declartion to avoid cross-reference
Expand Down Expand Up @@ -78,7 +78,7 @@ class ScheduleDesc {

/**
* \brief Replay this description to a new IRSchedule that is initialzied by a
* semantics-euqal original ModuleExpr.
* semantics-equal original ModuleExpr.
* @param schedule The original IRSchedule to be replayed the description on.
* @param without_post_schedule Determine whether to delete the post
* schedules.
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/ir/test/ir_compare_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ TEST(TestIrCompare, SingleFunction) {
ASSERT_TRUE(IRCompare(funcs_1.front(), funcs_2.front()));
// compare with itself
ASSERT_TRUE(IRCompare(funcs_1.front(), funcs_1.front()));
// they are euqal if allowing suffix of name different
// they are equal if allowing suffix of name different
ASSERT_TRUE(IRCompare(funcs_1.front(), funcs_2.front(), true));

ASSERT_FALSE(IRCompare(funcs_1.front(), funcs_3.front()));
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/ir/test/schedule_desc_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ std::string SourceCodeGen(const ModuleExpr& module_expr,
const std::vector<ir::LoweredFunc>& lowered_funcs,
const Target& target) {
auto exprs = module_expr.GetExprs();
CHECK_EQ(exprs.size(), lowered_funcs.size()) << "size of func is not euqal";
CHECK_EQ(exprs.size(), lowered_funcs.size()) << "size of func is not equal";
std::vector<ir::LoweredFunc> updated_funcs =
ir::ir_utils::IRCopy(lowered_funcs);
Module::Builder builder("test_module", target);
Expand Down
2 changes: 1 addition & 1 deletion paddle/cinn/ir/utils/ir_compare.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bool IrEqualVisitor::Compare(const std::string& lhs, const std::string& rhs) {
}

if (!equal) {
VLOG(5) << "Not euqal on name, lhs=" << lhs << ", rhs=" << rhs;
VLOG(5) << "Not equal on name, lhs=" << lhs << ", rhs=" << rhs;
}

return equal;
Expand Down
4 changes: 2 additions & 2 deletions paddle/cinn/ir/utils/ir_compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ namespace cinn {
namespace ir {
namespace ir_utils {

// Determine whether two ir AST trees are euqal by comparing their struct and
// Determine whether two ir AST trees are equal by comparing their struct and
// fields of each node through dfs visitor
class IrEqualVisitor : public IRVisitorRequireReImpl<bool, const Expr*> {
public:
explicit IrEqualVisitor(bool allow_name_suffix_diff = false,
bool only_compare_structure = false)
: allow_name_suffix_diff_(allow_name_suffix_diff),
only_compare_structure_(only_compare_structure) {}
// Return true if they are euqal, otherwise false;
// Return true if they are equal, otherwise false;
bool Compare(const Expr& lhs, const Expr& rhs);

private:
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/framework/fleet/ps_gpu_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void PSGPUWrapper::PreBuildTask(std::shared_ptr<HeterContext> gpu_task,
for (size_t i = 0; i < keys_vec.size(); ++i) {
if (!infer_mode_ || sage_mode_) {
CHECK_EQ(keys_vec[i]->size(), ranks_vec[i]->size())
<< keys_vec[i]->size() << " should be euqal to "
<< keys_vec[i]->size() << " should be equal to "
<< ranks_vec[i]->size();
for (size_t j = 0; j < keys_vec[i]->size(); ++j) {
auto& key = (*keys_vec[i])[j];
Expand All @@ -398,7 +398,7 @@ void PSGPUWrapper::PreBuildTask(std::shared_ptr<HeterContext> gpu_task,
}
} else {
CHECK_EQ(ranks_vec[i]->size(), 0UL)
<< ranks_vec[i]->size() << " should be euqal to 0";
<< ranks_vec[i]->size() << " should be equal to 0";
for (size_t j = 0; j < keys_vec[i]->size(); ++j) {
auto& key = (*keys_vec[i])[j];
int shard_idx = key % thread_keys_thread_num_;
Expand Down
10 changes: 5 additions & 5 deletions paddle/fluid/pir/transforms/inplace_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
return true;
}

auto is_numel_euqal = [](const TensorType& in,
auto is_numel_equal = [](const TensorType& in,
const TensorType& out) -> bool {
int64_t in_numel = 1;
int64_t out_numel = 1;
Expand Down Expand Up @@ -127,7 +127,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
};
// In this version, we don't consider the -1 in ddim, we just calculate the
// result.
auto is_numel_euqal_loose_version = [](const TensorType& in,
auto is_numel_equal_loose_version = [](const TensorType& in,
const TensorType& out) -> bool {
auto calculate_numel = [](const phi::DDim& ddim) -> int64_t {
int64_t numel = 1;
Expand All @@ -144,10 +144,10 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
bool equal = false;
bool relax = (RelaxShapeCheckOps.count(op_name) > 0);
if (relax) {
equal = is_numel_euqal_loose_version(input_alloc_tensor_type,
equal = is_numel_equal_loose_version(input_alloc_tensor_type,
output_alloc_tensor_type);
} else {
equal = is_numel_euqal(input_alloc_tensor_type, output_alloc_tensor_type);
equal = is_numel_equal(input_alloc_tensor_type, output_alloc_tensor_type);
}

if (!equal) {
Expand All @@ -159,7 +159,7 @@ bool CanDoInplace(const std::unordered_set<pir::Value>& eager_dels,
return false;
}
if (eager_dels.count(input) == 0) {
VLOG(9) << " -- input not in eager_deletion_valus, can't do inplace";
VLOG(9) << " -- input not in eager_deletion_vars, can't do inplace";
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pir/transforms/pd_op_to_kernel_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static bool NeedFallBackCpu(const pir::Operation* op,
static bool NeedFallBackFromGPUDNN2GPU(pir::Operation* op,
const phi::KernelKey kernel_key) {
// NOTE(phlrain): keep the same kernel select strategy with
// GetExepectKernelKey
// GetExpectKernelKey
if (op->isa<Pool2dOp>() || op->isa<Pool2dGradOp>() || op->isa<Pool3dOp>() ||
op->isa<Pool3dGradOp>()) {
if (kernel_key.backend() == phi::Backend::GPUDNN &&
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/pir/transforms/transform_general_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Operation* GetDefiningOpForInput(const Operation* op, uint32_t index);
* @brief Get operations and the index of designative op operand (op result)
that use the specific output of the operation.
*
* @param const Operation* cosnt pointer to an operation
* @param const Operation* const pointer to an operation
* @param uint32_t index of result of the operation

* @return std::vector<std::pair<Operation*, int32_t>>
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/infermeta/binary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ void ConvInferMeta(const MetaTensor& input,
strides.size() + 2U,
phi::errors::InvalidArgument(
"The difference of input's dimension and Attr(strides)'s "
"length must be euqal to 2 for Op(Conv). "
"length must be equal to 2 for Op(Conv). "
"But received: input's dimension is %d, input's shape is [%s]; "
"Attr(stride)'s length is %d, Attr(stride) is [%s]; "
"difference of input's dimention and Attr(strides)'s length = %u.",
Expand Down Expand Up @@ -732,7 +732,7 @@ void ConvTransposeInferMeta(const MetaTensor& x,
2U,
errors::InvalidArgument(
"The input's dimension size minus Attr(stride)'s size must "
"be euqal to 2 for Op(conv_transpose). But received: [%d], the "
"be equal to 2 for Op(conv_transpose). But received: [%d], the "
"input's dimension size is [%d], the shape of input "
"is [%s], the Attr(stride)'s size is [%d].",
in_sub_stride_size,
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/infermeta/fusion.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ void Conv2dXPUInferMeta(const MetaTensor& x,
strides.size() + 2U,
phi::errors::InvalidArgument(
"The difference of input's dimension and Attr(strides)'s "
"length must be euqal to 2 for Op(Conv_xpu). "
"length must be equal to 2 for Op(Conv_xpu). "
"But received: input's dimension is %d, input's shape is [%s]; "
"Attr(stride)'s length is %d, Attr(stride) is [%s]; "
"difference of input's dimention and Attr(strides)'s length = %u.",
Expand Down Expand Up @@ -2005,7 +2005,7 @@ void ConvTransposeXPUInferMeta(const MetaTensor& x,
2U,
errors::InvalidArgument(
"The input's dimension size minus Attr(stride)'s size must "
"be euqal to 2 for Op(conv_transpose). But received: [%d], the "
"be equal to 2 for Op(conv_transpose). But received: [%d], the "
"input's dimension size is [%d], the shape of input "
"is [%s], the Attr(stride)'s size is [%d].",
in_sub_stride_size,
Expand Down
8 changes: 4 additions & 4 deletions paddle/phi/infermeta/multiary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2836,7 +2836,7 @@ void LLMInt8LinearInferMeta(const MetaTensor& x,
x_dims[x_dims.size() - 1],
w_dims[1],
errors::InvalidArgument(
"Input(X) dim[-1] and Input(Weight) dim[1] should be euqal."
"Input(X) dim[-1] and Input(Weight) dim[1] should be equal."
"But received Input(X) dim[-1](%s) != Input(Weight) dim[1](%s)",
x_dims[x_dims.size() - 1],
w_dims[1]));
Expand All @@ -2856,7 +2856,7 @@ void LLMInt8LinearInferMeta(const MetaTensor& x,
weight_scale.dims()[0],
w_dims[0],
errors::InvalidArgument(
"Input(weight_scale) dim[0] and Input(Weight) dim[0] should be euqal."
"Input(weight_scale) dim[0] and Input(Weight) dim[0] should be equal."
"But received Input(weight_scale) dim[0](%s) != Input(Weight) "
"dim[0](%s)",
weight_scale.dims()[0],
Expand Down Expand Up @@ -4117,7 +4117,7 @@ void WeightOnlyLinearInferMeta(const MetaTensor& x,
x_dims[x_dims.size() - 1],
w_dims[1],
errors::InvalidArgument(
"Input(X) dim[-1] and Input(Weight) dim[1] should be euqal."
"Input(X) dim[-1] and Input(Weight) dim[1] should be equal."
"But received Input(X) dim[-1](%s) != Input(Weight) dim[1](%s)",
x_dims[x_dims.size() - 1],
w_dims[1]));
Expand Down Expand Up @@ -4205,7 +4205,7 @@ void YoloLossInferMeta(const MetaTensor& x,
PADDLE_ENFORCE_EQ(
dim_x[2],
dim_x[3],
phi::errors::InvalidArgument("Input(X) dim[3] and dim[4] should be euqal."
phi::errors::InvalidArgument("Input(X) dim[3] and dim[4] should be equal."
"But received dim[3](%s) != dim[4](%s)",
dim_x[2],
dim_x[3]));
Expand Down
4 changes: 2 additions & 2 deletions paddle/phi/infermeta/unary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ void DirichletInferMeta(const MetaTensor& alpha, MetaTensor* out) {
1,
phi::errors::InvalidArgument(
"ShapeError: The number of dimensions of 'Alpha' "
"must be greater than or euqal to 1. "
"must be greater than or equal to 1. "
"But received Alpha's dimensions = %d,",
alpha_dim.size()));
out->set_dims(alpha_dim);
Expand Down Expand Up @@ -3192,7 +3192,7 @@ void PoolInferMeta(const MetaTensor& x,
2U,
errors::InvalidArgument(
"the dimension of input minus the size of "
"Attr(kernel_size_) must be euqal to 2 in Op(pool). "
"Attr(kernel_size_) must be equal to 2 in Op(pool). "
"But received: the dimension of input minus the size "
"of Attr(kernel_size_) is %d, the "
"input's dimension is %d, the shape of input "
Expand Down
2 changes: 1 addition & 1 deletion paddle/phi/kernels/cpu/conv_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ inline std::vector<int64_t> ComputeOutputShape(
strides.size() + 2U,
phi::errors::InvalidArgument(
"The difference of input's dimension and Attr(strides)'s "
"length must be euqal to 2 for Op(Conv). "
"length must be equal to 2 for Op(Conv). "
"But received: input's dimension is %d, input's shape is [%s]; "
"Attr(stride)'s length is %d, Attr(stride) is [%s]; "
"difference of input's dimension and Attr(strides)'s length = %u.",
Expand Down
Loading