Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Hongpeng Guo <[email protected]>
  • Loading branch information
hongpeng-guo committed Jan 30, 2025
1 parent 984e85f commit eb90401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liger_kernel/ops/fused_linear_cross_entropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def fused_linear_cross_entropy_backward(
grad_output, grad_input, grad_weight, grad_bias
)
# Calculate the gradient with respect to the entropy losses
if grad_entropy_output is not None:
if grad_entropy_output is not None:
grad_entropy_input, grad_entropy_weight, grad_entropy_bias = _fused_linear_backward_helper(
grad_entropy_output, grad_entropy_input, grad_entropy_weight, grad_entropy_bias
)
Expand All @@ -277,7 +277,7 @@ def fused_linear_cross_entropy_backward(
grad_weight += grad_entropy_weight
if grad_bias is not None:
grad_bias += grad_entropy_bias

return grad_input, grad_weight, grad_bias


Expand Down

0 comments on commit eb90401

Please sign in to comment.