Fix FA bwd alibi+causal NaN errors (#1352)

* fix bwd alibi nan error

* fix datatype

---------

Co-authored-by: danyao12 <danyao12>
This commit is contained in:
Dan Yao
2024-06-20 22:50:53 +08:00
committed by GitHub
parent 0162a5f6ba
commit 1da802bdf2
2 changed files with 3 additions and 3 deletions

View File

@@ -372,7 +372,7 @@ struct SimplifiedGenericAttentionMask
// index_t x_end = min(i_y + x, x_total);
bool top_right_edge = i_x_end > min(i_y + x, x_total); // consider right pad
bool bottom_left_edge = i_y_end > (i_x + y);
bool bottom_left_edge = i_y_end > min(i_x + y, y_total); // consider bottom pad
// bool is_partial_out_of_bound = i_x_end > x_end; // only consider right-pad for now
return top_right_edge || bottom_left_edge;