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
8 changes: 4 additions & 4 deletions paddle/fluid/operators/elementwise/elementwise_add_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ElementwiseAddCompositeGradOpMaker
phi::errors::InvalidArgument(
"We only support axis = -1 in composite add_grad but we got: ",
axis));
VLOG(6) << "Runing add_grad composite func";
VLOG(6) << "Running add_grad composite func";
prim::add_grad<prim::DescTensor>(x, y, out_grad, axis, dx_ptr, dy_ptr);
this->RecoverOutputName(dx, dx_name);
this->RecoverOutputName(dy, dy_name);
Expand Down Expand Up @@ -122,13 +122,13 @@ class ElementwiseAddCompositeDoubleGradOpMaker
axis,
-1,
phi::errors::InvalidArgument("We only support axis = -1 in composite "
"add_doubel_grad but we got: ",
"add_double_grad but we got: ",
axis));

paddle::Tensor* grad_out_grad = this->GetOutputPtr(&grad_out_grad_t);
std::string grad_out_grad_name = this->GetOutputName(grad_out_grad_t);

VLOG(6) << "Runing add_double_grad composite func";
VLOG(6) << "Running add_double_grad composite func";
prim::add_double_grad<prim::DescTensor>(
y, out_grad, ddx, ddy, axis, grad_out_grad);
this->RecoverOutputName(grad_out_grad_t, grad_out_grad_name);
Expand Down Expand Up @@ -184,7 +184,7 @@ class ElementwiseAddCompositeTripleGradOpMaker
paddle::Tensor* grad_grad_y = this->GetOutputPtr(&grad_grad_y_t);
std::string grad_grad_y_name = this->GetOutputName(grad_grad_y_t);

VLOG(6) << "Runing add_triple_grad composite func";
VLOG(6) << "Running add_triple_grad composite func";
prim::add_triple_grad<prim::DescTensor>(
ddx, ddy, d_ddout, axis, grad_grad_x, grad_grad_y);
this->RecoverOutputName(grad_grad_x_t, grad_grad_x_name);
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/elementwise/elementwise_div_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ElementwiseDivCompositeGradOpMaker
-1,
phi::errors::InvalidArgument(
"We only support axis = -1 in composite div but we got: ", axis));
VLOG(6) << "Runing div_grad composite func";
VLOG(6) << "Running div_grad composite func";
prim::divide_grad<prim::DescTensor>(
x, y, out, out_grad, axis, dx_ptr, dy_ptr);
this->RecoverOutputName(dx, dx_name);
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/operators/elementwise/elementwise_functor.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ using InverseDivFunctor = phi::funcs::InverseDivideFunctor<T>;
template <typename T>
using MaxFunctor = phi::funcs::MaximumFunctor<T>;

// Minmum
// Minimum
template <typename T>
using MinFunctor = phi::funcs::MinimumFunctor<T>;

Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/operators/elementwise/elementwise_mul_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ElementwiseMulCompositeGradOpMaker
axis));
prim::multiply_grad<prim::DescTensor>(
x, y, out_grad, axis, x_grad_p, y_grad_p);
VLOG(6) << "Runing mul_grad composite func";
VLOG(6) << "Running mul_grad composite func";
this->RecoverOutputName(x_grad, x_grad_name);
this->RecoverOutputName(y_grad, y_grad_name);
}
Expand Down Expand Up @@ -157,7 +157,7 @@ class ElementwiseMulCompositeDoubleGradOpMaker
std::string y_grad_name = this->GetOutputName(y_grad_t);
std::string grad_out_grad_name = this->GetOutputName(grad_out_grad_t);

VLOG(6) << "Runing multiply_double_grad composite func";
VLOG(6) << "Running multiply_double_grad composite func";
prim::multiply_double_grad<prim::DescTensor>(
x, y, out_grad, ddx, ddy, axis, x_grad, y_grad, grad_out_grad);

Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/operators/elementwise/elementwise_op_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace operators {

/*
* Pack input and output tensors into respective vectors with
* consideration of varible X`s class type.
* consideration of variable X`s class type.
* Input variable X is supported to be whether phi::DenseTensor or
* SelectedRows class type in this package function, once X
* was SelectedRows type, a valid pointer x_for_selectedrows
Expand Down Expand Up @@ -91,13 +91,13 @@ int PackTensorsIntoVector(const framework::ExecutionContext &ctx,
true,
platform::errors::InvalidArgument(
"For elementwise_op, if X is Sparse, Y must be "
"scalar. But reveived the size of Y = %d.",
"scalar. But received the size of Y = %d.",
y->dims().size()));
PADDLE_ENFORCE_NOT_NULL(
x_for_selectedrows,
platform::errors::InvalidArgument(
"The parameter x_for_selectedrows is excepted to "
"be valid, once input varible X`s class type is "
"be valid, once input variable X`s class type is "
"SelectedRows.\n"));
auto &x_sele = x_var->Get<phi::SelectedRows>();
auto out_sele = ctx.Output<phi::SelectedRows>("Out");
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/operators/elementwise/elementwise_sub_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ElementwiseSubOpMaker : public ElementwiseOpMaker {
}

std::string GetOpFunctionality() const override {
return "Substract two tensors element-wise";
return "Subtract two tensors element-wise";
}
};

Expand All @@ -76,7 +76,7 @@ class ElementwiseSubCompositeGradOpMaker
phi::errors::InvalidArgument(
"We only support axis = -1 in composite sub_grad but we got: ",
axis));
VLOG(6) << "Runing sub_grad composite func";
VLOG(6) << "Running sub_grad composite func";
prim::subtract_grad<prim::DescTensor>(x, y, out_grad, axis, dx_ptr, dy_ptr);
this->RecoverOutputName(dx, dx_name);
this->RecoverOutputName(dy, dy_name);
Expand Down Expand Up @@ -131,7 +131,7 @@ class ElementwiseSubCompositeDoubleGradOpMaker
paddle::Tensor* grad_out_grad = this->GetOutputPtr(&grad_out_grad_t);
std::string grad_out_grad_name = this->GetOutputName(grad_out_grad_t);

VLOG(6) << "Runing subtract_double_grad composite func";
VLOG(6) << "Running subtract_double_grad composite func";
prim::subtract_double_grad<prim::DescTensor>(
y, out_grad, ddx, ddy, axis, grad_out_grad);
this->RecoverOutputName(grad_out_grad_t, grad_out_grad_name);
Expand Down