Skip to content
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

[DTensor] refactor CommSpec #3034

Merged

Conversation

YuliangLiu0306
Copy link
Contributor

@YuliangLiu0306 YuliangLiu0306 commented Mar 7, 2023

📌 Checklist before creating the PR

  • I have created an issue for this PR for traceability
  • The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

resolved #3035

📝 What does this PR do?

The previous CommSpec used in Auto-Parallel module contains some attributes which is not necessary to describe a communication operation, such as ShardingSpec, DeviceMesh.

Previously,It has two main functions:

  1. Compute the communication cost which will be used in auto parallel solver.
  2. Convert the communication spec to real action which will be used in runtime.

However,the first function may not be necessary if we jump out of the auto-parallel scenario.

To make a clean design, the new CommSpec will just contains the attributes to decribe a communication operation and supply a function to apply the CommSpec to real execution.

image

💥 Checklist before requesting a review

  • I have linked my PR to an issue (instruction)
  • My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • I have performed a self-review of my code
  • I have added thorough tests.
  • I have added docstrings for all the functions/methods I implemented

⭐️ Do you enjoy contributing to Colossal-AI?

  • 🌝 Yes, I do.
  • 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

@YuliangLiu0306 YuliangLiu0306 linked an issue Mar 7, 2023 that may be closed by this pull request
@YuliangLiu0306 YuliangLiu0306 added the enhancement New feature or request label Mar 7, 2023
@FrankLeeeee
Copy link
Contributor

LGTM.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


LGTM.

@FrankLeeeee FrankLeeeee merged commit 29386a5 into hpcaitech:main Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Refactor CommSpec
3 participants