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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[autochunk] support diffusion for autochunk #2621

Merged
merged 36 commits into from
Feb 7, 2023
Merged

Conversation

oahzxl
Copy link
Contributor

@oahzxl oahzxl commented Feb 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

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

#2620

馃摑 What does this PR do?

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

Support diffusion for autochunk. Reduce over 70% memory.

  1. support some ops for diffusion, such as groupnorm, interpolate and conv.
  2. refact some logic to fit diffusion
  3. update test for diffsuion

馃挜 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

@oahzxl oahzxl added enhancement New feature or request Run Build and Test labels Feb 7, 2023
@oahzxl oahzxl linked an issue Feb 7, 2023 that may be closed by this pull request
@oahzxl
Copy link
Contributor Author

oahzxl commented Feb 7, 2023

image

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

The code coverage for the changed files is 11%.

Click me to view the complete report
Name                                                                            Stmts   Miss  Cover
---------------------------------------------------------------------------------------------------
colossalai/autochunk/autochunk_codegen.py                                         276    256     7%
colossalai/autochunk/search_chunk.py                                              154    135    12%
colossalai/autochunk/trace_flow.py                                                265    247     7%
colossalai/autochunk/trace_indice.py                                              463    417    10%
tests/test_autochunk/test_autochunk_diffuser/test_autochunk_diffuser_utils.py      60     48    20%
tests/test_autochunk/test_autochunk_diffuser/test_autochunk_unet.py                33      9    73%
---------------------------------------------------------------------------------------------------
TOTAL                                                                            1251   1112    11%

@Shenggan Shenggan self-requested a review February 7, 2023 08:22
@oahzxl oahzxl merged commit 6ba8364 into hpcaitech:main Feb 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2023

The code coverage for the changed files is 11%.

Click me to view the complete report
Name                                                                            Stmts   Miss  Cover
---------------------------------------------------------------------------------------------------
colossalai/autochunk/autochunk_codegen.py                                         276    256     7%
colossalai/autochunk/search_chunk.py                                              154    135    12%
colossalai/autochunk/trace_flow.py                                                265    247     7%
colossalai/autochunk/trace_indice.py                                              463    417    10%
tests/test_autochunk/test_autochunk_diffuser/test_autochunk_diffuser_utils.py      60     48    20%
tests/test_autochunk/test_autochunk_diffuser/test_autochunk_unet.py                33      9    73%
---------------------------------------------------------------------------------------------------
TOTAL                                                                            1251   1112    11%

@oahzxl oahzxl deleted the unet branch February 7, 2023 09:12
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]: support diffusion for autochunk
2 participants