-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Add MLU Support. #12629
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
Add MLU Support. #12629
Conversation
|
@a120092009 thanks for your PR! Could you talk a bit about the performance of this new accelerator? Any advantages over regular NVIDIA GPUs, etc.? |
ad9f204 to
74a810f
Compare
|
Cambricon is a well-known AI-chip company in China. For the detailed product message, please see our homepage: https://www.cambricon.com/ |
yiyixuxu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR!
src/diffusers/utils/torch_utils.py
Outdated
| return "xpu" | ||
| elif torch.backends.mps.is_available(): | ||
| return "mps" | ||
| elif torch.mlu.is_available(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| elif torch.mlu.is_available(): | |
| elif is_mlu_available: |
also need to import this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
@bot /style |
|
Style bot fixed some files and pushed the changes. |
What does this PR do?
Add Cambricon MLU support for diffusers. Context parallelism test will be error without mlu support due to " Supported strategies are: balanced, cpu".
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sayakpaul @yiyixuxu
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
Test Code
Result:

