Skip to content

Commit 4cf5a4b

Browse files
committed
fix bug
1 parent a4018b5 commit 4cf5a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/phi/kernels/gpu/elementwise_grad.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ void ElementwiseMulGrad(const GPUContext &dev_ctx,
397397

398398
bool need_dx = (dx != nullptr) && (dx->numel() != 0);
399399
bool need_dy = (dy != nullptr) && (dy->numel() != 0);
400-
if (need_dy && need_dy) {
400+
if (need_dx && need_dy) {
401401
std::vector<const DenseTensor *> ins = {&dout, &y, &x};
402402
GetGradXAndYOut<T>(dev_ctx,
403403
place,

0 commit comments

Comments
 (0)