remove contiguous copy for flash-attn opbuilder - #372
Conversation
|
@conglongli Hi, could you help to review this PR? Thanks |
|
Hi @tjruwase, it seems that conglong is not available, could you help to review this? Thanks. |
|
@YizhouZ, will this change work with older flash-attn op builder? |
I think not. These are two different shape required for input tensor. I could make it specific for xpu device if you want less impact. |
In that case, can we condition based on flash attn version? It is important to maintain backwards-compatibility. Thanks! |
I made some changes:
could you help to review again? Thanks! |
|
@YizhouZ, thanks for the PR. |
following megatron-ds original attention shape, now flash-attn op builder supports only [B, S, H, D] shape. Two contiguous copy time could be improved by this PR.