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

Molly/enable unet1d #2242

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

DiweiSun
Copy link

@DiweiSun DiweiSun commented Apr 25, 2024


Enabling Unet1d to track OP performance:conv_transpose1d.

This PR is to enable Huggingface/Diffusers/UNET1D which includes conv_transpose1d on upsampling and downsampling phase.
(In #120982, a remarkable performance regression happens to conv_transpose1d. )

Note: Torch.profiling Detail suggests: conv_transposed accounts for 5% of the total time consumption in UNET1D.

Verified on Torch2.2 and Torch 1.13.1 with default config, with the following cmd
numactl -C 0 python run.py unet1d (The test scripts refer to https://huggingface.co/docs/diffusers/quicktour)

Torch 2.2 where conv_tranpose1d contributes 2.2ms
CPU Wall Time per batch: 10.803 milliseconds
CPU Wall Time: 10.803 milliseconds
Time to first batch: 25.9873 ms
CPU Peak Memory: 0.5264 GB

Torch 1.13 where conv_transpose1d contributes 0.8ms
CPU Wall Time per batch: 10.365 milliseconds
CPU Wall Time: 10.365 milliseconds
Time to first batch: 24.0618 ms
CPU Peak Memory: 0.4609 GB

@facebook-github-bot
Copy link
Contributor

Hi @DiweiSun!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@DiweiSun DiweiSun marked this pull request as ready for review May 7, 2024 03:23
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@DiweiSun
Copy link
Author

DiweiSun commented May 7, 2024

@chuanqi129 , could you please kindly help review?

eval_benchmark: true
eval_deterministic: false
eval_nograd: true
train_benchmark: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this model support train test?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet. This should be a mistake. Thanks for pointing out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants