Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AshburnLee committed Jan 12, 2022
1 parent 6ab80a3 commit 4bfe7aa
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions paddle/fluid/operators/elementwise/elementwise_max_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,10 @@ ElementwiseMaxGrad(const framework::ExecutionContext& ctx,
ctx.template device_context<platform::CUDADeviceContext>();
const auto place = ctx.GetPlace();
if (dx != nullptr && dy != nullptr) {
// dx->mutable_data<T>(place);
// if (dx->IsSharedBufferWith(*dout)) {
// dx->clear();
// dx->mutable_data<T>(x->dims(), place);
// }
std::vector<const framework::Tensor*> ins = {x, y, dout};
GetGradXAndYOut<ElementwiseType::kTernary, T>(
dev_ctx, place, axis, ins, dout, dx, dy, MaxGradXYFunctor<T, T>());
} else if (dx != nullptr && dy == nullptr) {
// dx->mutable_data<T>(place);
// if (dx->IsSharedBufferWith(*dout)) {
// dx->clear();
// dx->mutable_data<T>(x->dims(), place);
// }
std::vector<const framework::Tensor*> ins = {x, y, dout};
GetGradXOrYOut<ElementwiseType::kTernary, T>(
dev_ctx, place, axis, ins, dout, dx, MaxGradXFunctor<T>());
Expand Down

1 comment on commit 4bfe7aa

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.