Skip to content

[Fix] fix the 2d ring attn when using multiple machine#6070

Closed
wangbluo wants to merge 2 commits intohpcaitech:mainfrom
wangbluo:fix_ring_attn
Closed

[Fix] fix the 2d ring attn when using multiple machine#6070
wangbluo wants to merge 2 commits intohpcaitech:mainfrom
wangbluo:fix_ring_attn

Conversation

@wangbluo
Copy link
Copy Markdown
Contributor

@wangbluo wangbluo commented Sep 25, 2024

🚨 Issue number

fixed #6017

📝 What does this PR do?

The double_ring_groups need to consider the tp groups as the tp axis is the first axis.
And the ranks in double_ring_groups need to transformered into global ranks.

For example, if using the first four cards of two machines, totaling eight cards for ring attention, the ranks of the inner ring group would be [0, 2], [1, 3], [4, 6], [5, 7], while the ranks of the inter ring group would be [0, 4], [1, 5], [2, 6], [3, 7].

Results:
image

@wangbluo wangbluo requested a review from a team as a code owner September 25, 2024 10:42
@wangbluo wangbluo closed this Sep 25, 2024
@wangbluo wangbluo deleted the fix_ring_attn branch September 26, 2024 10:05
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.

1 participant