Skip to content

Commit

Permalink
fix softmax backward (#57858)
Browse files Browse the repository at this point in the history
  • Loading branch information
carryyu authored Oct 11, 2023
1 parent 0d9bb6c commit 970e1f3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions paddle/phi/kernels/gpudnn/softmax_gpudnn.h
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,7 @@ bool UseCudnnSoftmax(const GPUContext& ctx,
}
constexpr int max_dim = 1024;
if (!cudnn_available || !last_dim ||
(softmax_dim <= max_dim && sizeof(T) <= 4) ||
softmax_dim >= MATRIX_SOFTMAX_THREAHOLD) {
(softmax_dim <= max_dim && sizeof(T) <= 4)) {
return false;
} else {
return true;
Expand Down

0 comments on commit 970e1f3

Please sign in to comment.