-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
bugfix for npu not support float64 #10123
base: main
Are you sure you want to change the base?
Conversation
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
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.
I think the changes should be relatively safe as it is device-dependant changes only in this PR.
Would may be cleaner if we do a follow-up to handle these kinds of device-specific handling of dtypes with better design in the scheduler. Off to @yiyixuxu for review, and I can handle any of the pipelines we're missing or that were newly added in the duration this PR went stale
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. |
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.
I've applied this to newer code and changed it from is_mps_or_is_npu
to separate is_mps
is_npu
to match what was done in FluxPosEmbed
.
cc @yiyixuxu |
What does this PR do?
When using the FLUX model on NPU devices, an error was found in the
embeddings.py
file. After locating the problem, it was discovered that the issue was due tofreqs_dtype
beingfloat64
, which is not supported on NPU. To resolve this issue, a check fordevice.type
was implemented. When using an NPU, float32 is used instead.example used
Before this PR
After this PR
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
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.
cc @yiyixuxu @sayakpaul