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

[analyzer] a minimal implementation of static graph analyzer #2852

Merged
merged 25 commits into from
Mar 10, 2023

Conversation

super-dainiu
Copy link
Contributor

@super-dainiu super-dainiu commented Feb 21, 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

Fixed #2850

📝 What does this PR do?

I reimplemented the static graph analysis for Colossal-AI. Hope to receive more discussion before the merge. Y'all can refer to
https://github.com/super-dainiu/siu/tree/master/playground and https://github.com/super-dainiu/siu/tree/master/tests for more information. I would push these folders to the main branch later.

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

@FrankLeeeee
Copy link
Contributor

Code factor has prompted several issues, please fix.

https://www.codefactor.io/repository/github/hpcaitech/colossalai/pull/2852

@super-dainiu super-dainiu added the auto-parallel related to the auto-parallel feature label Feb 21, 2023
@github-actions
Copy link
Contributor

The code coverage for the changed files is 43%.

Click me to view the complete report
Name                                         Stmts   Miss  Cover
----------------------------------------------------------------
colossalai/fx/passes/concrete_info_prop.py      64     36    44%
colossalai/fx/passes/meta_info_prop.py         100     33    67%
colossalai/fx/profiler/opcount.py              114     90    21%
----------------------------------------------------------------
TOTAL                                          278    159    43%

@super-dainiu
Copy link
Contributor Author

hihi, I add some test for analyzer @YuliangLiu0306

@YuliangLiu0306
Copy link
Contributor

hihi, I add some test for analyzer @YuliangLiu0306

You need to rebase your code to fix the CI issue.

@super-dainiu
Copy link
Contributor Author

The problem is CI cannot install Colossal-AI

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2023

The code coverage for the changed files is 25%.

Click me to view the complete report
Name                                                      Stmts   Miss  Cover
-----------------------------------------------------------------------------
colossalai/_analyzer/_subclasses/__init__.py                  4      3    25%
colossalai/_analyzer/_subclasses/_meta_registration.py      222    217     2%
colossalai/_analyzer/fx/__init__.py                           4      3    25%
colossalai/_analyzer/fx/bias_addition.py                     61     56     8%
colossalai/_analyzer/fx/symbolic_trace.py                   325    314     3%
colossalai/fx/passes/concrete_info_prop.py                   64     36    44%
colossalai/fx/passes/meta_info_prop.py                      101     33    67%
colossalai/fx/profiler/opcount.py                           114     90    21%
tests/test_analyzer/test_fx/__init__.py                       0      0   100%
tests/test_analyzer/test_fx/test_bias_addition.py            70     38    46%
tests/test_analyzer/test_fx/test_mod_dir.py                  47     26    45%
tests/test_analyzer/test_fx/test_nested_ckpt.py              40     20    50%
tests/test_analyzer/test_fx/test_shape_prop.py               44     27    39%
tests/test_analyzer/test_fx/test_symbolic_profile.py         36     19    47%
tests/test_analyzer/test_fx/zoo.py                            4      0   100%
tests/test_analyzer/test_subclasses/__init__.py               0      0   100%
tests/test_analyzer/test_subclasses/test_aten.py             30     15    50%
tests/test_analyzer/test_subclasses/test_flop_tensor.py      29     11    62%
tests/test_analyzer/test_subclasses/test_meta_mode.py        29     14    52%
tests/test_analyzer/test_subclasses/zoo.py                    4      0   100%
-----------------------------------------------------------------------------
TOTAL                                                      1228    922    25%

@super-dainiu
Copy link
Contributor Author

now is good @YuliangLiu0306

@Issues-translate-bot
Copy link

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


now is good @YuliangLiu0306

@YuliangLiu0306 YuliangLiu0306 merged commit fff98f0 into hpcaitech:main Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-parallel related to the auto-parallel feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PROPOSAL]: A Minimal Implementation of Static Graph Analyzer
4 participants