Open i4never opened 1 week ago
/te-ci pytorch
Hi @i4never
Thanks for submitting the PR! Have you done any E2E training test with your PR? There is some case where communication can take longer time than compute, your code seems can set p2p_comm_buffers[i]=None
before the async P2P communication is done, right? Wouldn't this result in any issue?
Actually, how critical is it for you to fix the issue? The communication buffers are temp buffers per transformer layer, while the attention fwd of a transformer layer is done, those buffers will be released dynamically. Assuming mbs=1, seq=64K, head_dim=128, GQA group of 8 (i.e., num of KV heads is 8), and BF16 precision. The total P2P comm buffer size is only 65536128228=256MB. For long sequence like 64K, you may apply TP. Assuming TP8, then total P2P comm buffer size will be 8 times smaller, i.e., 256/8=32MB. Do you have a special case which the buffer size is too big?
Thanks.
Description
Release p2p_comm_buffers.
Fixes #952
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: