Skip to content

[autochunk] support diffusion for autochunk#2621

Merged
oahzxl merged 36 commits intohpcaitech:mainfrom
oahzxl:unet
Feb 7, 2023
Merged

[autochunk] support diffusion for autochunk#2621
oahzxl merged 36 commits intohpcaitech:mainfrom
oahzxl:unet

Conversation

@oahzxl
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

oahzxl commented Feb 7, 2023

image

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
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