Skip to content

Commit

Permalink
temporary fix pow_2_grad (#69065)
Browse files Browse the repository at this point in the history
  • Loading branch information
cubehan3 authored Oct 31, 2024
1 parent b7ce84e commit 07a5af3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions paddle/phi/kernels/funcs/elementwise_grad_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1513,10 +1513,13 @@ void CommonGradBroadcastCUDA(const DenseTensor &x,
VLOG(3) << "CommonBroadcast can_split_y:" << can_split_y
<< " can_split_x:" << can_split_x;
// if both x and y into fast path then return
if (fast_broadcast_x && fast_broadcast_y) {
fast_broadcast = true;
}
if (can_split_y && can_split_x && fast_broadcast) return;

//* It's possible that some bugs are a result of early returns, comment out
// the code for checking.
// if (fast_broadcast_x && fast_broadcast_y) {
// fast_broadcast = true;
// }
// if (can_split_y && can_split_x && fast_broadcast) return;
}

// Should remove memory copy, use reg instead.
Expand Down

0 comments on commit 07a5af3

Please sign in to comment.