Skip to content

Commit 1c76b31

Browse files
committed
Removes unused column stride fields from attention structs
Eliminates mask_col_stride, bias_col_stride, and dbias_col_stride fields from the Mask_params, Bias_params, and Flash_bwd_params structures. These column stride parameters were not being utilized in the attention implementation, removing unnecessary complexity and reducing memory footprint of the parameter structures.
1 parent af12e80 commit 1c76b31

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

csrc/src/flash.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct Mask_params {
5050
index_t mask_batch_stride; // Stride between batches of attention mask
5151
index_t mask_head_stride; // Stride between heads of attention mask
5252
index_t mask_row_stride; // Stride between rows of attention mask
53-
index_t mask_col_stride; // Stride between columns of attention mask
5453
};
5554

5655
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -62,7 +61,6 @@ struct Bias_params {
6261
index_t bias_batch_stride; // Stride between batches of attention bias
6362
index_t bias_head_stride; // Stride between heads of attention bias
6463
index_t bias_row_stride; // Stride between rows of attention bias
65-
index_t bias_col_stride; // Stride between columns of attention bias
6664
};
6765

6866
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -179,7 +177,6 @@ struct Flash_bwd_params : public Flash_fwd_params {
179177
index_t dbias_batch_stride;
180178
index_t dbias_head_stride;
181179
index_t dbias_row_stride;
182-
index_t dbias_col_stride;
183180

184181
// The pointer to the softmax d sum.
185182
void *__restrict__ dsoftmax_sum;

0 commit comments

Comments
 (0)