Skip to content

[zero]support no_sync method for zero1 plugin#4138

Merged
ver217 merged 3 commits intohpcaitech:feature/zerofrom
Gy-Lu:feature/zero
Jul 4, 2023
Merged

[zero]support no_sync method for zero1 plugin#4138
ver217 merged 3 commits intohpcaitech:feature/zerofrom
Gy-Lu:feature/zero

Conversation

@Gy-Lu
Copy link
Copy Markdown
Contributor

@Gy-Lu Gy-Lu commented Jul 3, 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

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge

e.g. fixed #1234, closed #1234, resolved #1234

fixed #4128

📝 What does this PR do?

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.

Support the low level zero plugin with no_sync when it comes to zero1.

💥 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.

@Gy-Lu Gy-Lu added the API related to API changes label Jul 3, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 3, 2023

The code coverage for the changed files is 85%.

Click me to view the complete report
Name                                                           Stmts   Miss  Cover
----------------------------------------------------------------------------------
colossalai/booster/booster.py                                     64     10    84%
colossalai/booster/plugin/gemini_plugin.py                       110      9    92%
colossalai/booster/plugin/low_level_zero_plugin.py                98     11    89%
colossalai/booster/plugin/plugin_base.py                          40     10    75%
colossalai/booster/plugin/torch_ddp_plugin.py                     66      2    97%
colossalai/booster/plugin/torch_fsdp_plugin.py                    97     13    87%
colossalai/zero/low_level/_utils.py                              125     66    47%
colossalai/zero/low_level/bookkeeping/bucket_store.py             51      0   100%
colossalai/zero/low_level/bookkeeping/gradient_store.py           31      1    97%
colossalai/zero/low_level/bookkeeping/parameter_store.py          16      0   100%
colossalai/zero/low_level/low_level_optim.py                     278     20    93%
tests/test_booster/test_plugin/test_low_level_zero_plugin.py      59      6    90%
tests/test_zero/test_low_level/test_grad_acc.py                   92     31    66%
tests/test_zero/test_low_level/test_zero1_2.py                   102      1    99%
----------------------------------------------------------------------------------
TOTAL                                                           1229    180    85%

@Gy-Lu Gy-Lu requested a review from ver217 July 3, 2023 09:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 3, 2023

The code coverage for the changed files is 85%.

Click me to view the complete report
Name                                                           Stmts   Miss  Cover
----------------------------------------------------------------------------------
colossalai/booster/booster.py                                     64     10    84%
colossalai/booster/plugin/gemini_plugin.py                       110      9    92%
colossalai/booster/plugin/low_level_zero_plugin.py                98     11    89%
colossalai/booster/plugin/plugin_base.py                          40     10    75%
colossalai/booster/plugin/torch_ddp_plugin.py                     66      2    97%
colossalai/booster/plugin/torch_fsdp_plugin.py                    97     13    87%
colossalai/zero/low_level/_utils.py                              125     66    47%
colossalai/zero/low_level/bookkeeping/bucket_store.py             51      0   100%
colossalai/zero/low_level/bookkeeping/gradient_store.py           31      1    97%
colossalai/zero/low_level/bookkeeping/parameter_store.py          16      0   100%
colossalai/zero/low_level/low_level_optim.py                     278     20    93%
tests/test_booster/test_plugin/test_low_level_zero_plugin.py      59      6    90%
tests/test_zero/test_low_level/test_grad_acc.py                   92     31    66%
tests/test_zero/test_low_level/test_zero1_2.py                   102      1    99%
----------------------------------------------------------------------------------
TOTAL                                                           1229    180    85%

Comment thread colossalai/booster/plugin/low_level_zero_plugin.py Outdated
@ver217 ver217 merged commit a1bf517 into hpcaitech:feature/zero Jul 4, 2023
@Gy-Lu Gy-Lu deleted the feature/zero branch July 4, 2023 05:51
ver217 pushed a commit to ver217/ColossalAI that referenced this pull request Jul 13, 2023
* support no sync for zero1 plugin

* polish

* polish
ver217 pushed a commit that referenced this pull request Jul 31, 2023
* support no sync for zero1 plugin

* polish

* polish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API related to API changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants