Skip to content

Conversation

@LoserCheems
Copy link
Collaborator

This pull request simplifies the implementation of the compute_attn_1rowblock function in the flash_attention_fwd_kernel.h file by removing support for the causal mask feature. The changes streamline the code and improve maintainability by eliminating unused variables, memory allocations, and operations related to the causal mask.

Removal of Causal Mask Support:

  • Removed all references to the causal mask, including memory allocation (sCausalMask), global memory tile (gCausalMask), and thread slice partitioning (gmem_thr_copy_CausalMask). [1] [2] [3] [4] [5]

  • Deleted logic for handling the causal mask in shared memory, including initialization, copying, and synchronization steps.

Code Simplification:

  • Adjusted shared memory layout and memory copy operations to focus solely on the remaining features, such as ZeroHold. [1] [2]

  • Updated predicates and identity tensors to remove any references to the causal mask, ensuring the code reflects the simplified functionality. [1] [2]

@LoserCheems LoserCheems merged commit 134fe9a into main May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants