8000 [Feature] Support Hierarchical Group-Cast Collective Communication by Strivin0311 · Pull Request #26 · SandAI-org/MagiAttention · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Feature] Support Hierarchical Group-Cast Collective Communication #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 4, 2025

Conversation

Strivin0311
Copy link
Contributor
  • Supported 1D/2D cp device mesh as an interface argument.
  • Supported hierarchical group-cast collective:
    • It is based upon all2all-v and 2d cp device mesh (inter-node x intra-node)
    • We add an environment variable MAGI_ATTENTION_HIERARCHICAL_COMM to control whether to enable hierarchical group-cast.
    • To enable it, you only need to set export MAGI_ATTENTION_HIERARCHICAL_COMM=1 and pass a 2D cp device mesh.
    • You can use if magi_attention.is_hierarchical_comm_enable(): to check if it is enabled.
    • NOTE: it had better been enabled when magi_attention.is_cuda_device_max_connections_one() == False.
    • The high_bandwidth_domain_size > 1 is also forbidden when it's enabled.
  • Optimized and polished the code in comm/primitive/utils.py to reduce runtime overhead for range ops.
  • Enabled range_fill_ kernel for out_zero_fill operation in each attn_fwd_partial call.

@Strivin0311 Strivin0311 force-pushed the feature/support_hier_comm branch from afb0470 to a52b290 Compare May 23, 2025 11:19
@Strivin0311 Strivin0311 force-pushed the feature/support_hier_comm branch from 1ad3c8e to 4f9313e Compare June 3, 2025 05:42
@littsk littsk merged commit f5089c7 into dev Jun 4, 2025
6 checks passed
@littsk littsk deleted the feature/support_hier_comm branch June 4, 2025 02:48
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.

2 participants
0