Skip to content

Import accelerate very early to make Intel GPU happy#4704

Merged
oobabooga merged 1 commit into
oobabooga:devfrom
notsyncing:dev
Dec 4, 2023
Merged

Import accelerate very early to make Intel GPU happy#4704
oobabooga merged 1 commit into
oobabooga:devfrom
notsyncing:dev

Conversation

@notsyncing
Copy link
Copy Markdown
Contributor

Import accelerate first in server.py, or the accelerate.utils.is_xpu_available() will return False if imported later.

Note: this is only a workaround. At least it works for now. Needs more testing.

Checklist:

  * Import accelerate first in server.py, or the
    accelerate.utils.is_xpu_available() will return
    False if imported later.
@notsyncing notsyncing mentioned this pull request Nov 22, 2023
@notsyncing
Copy link
Copy Markdown
Contributor Author

@oobabooga I'm not sure if this change would affect other backends like cuda, metal, etc, any ideas?

Copy link
Copy Markdown
Contributor

@abhilash1910 abhilash1910 left a comment

Choose a reason for hiding this comment

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

This is a temporary good WA , as there seems to be a dependency on other libraries when imported before accelerate. Working on it .

@notsyncing notsyncing marked this pull request as ready for review November 26, 2023 08:37
@oobabooga
Copy link
Copy Markdown
Owner

This is ugly, but let's do it

@oobabooga oobabooga merged commit 0bfd509 into oobabooga:dev Dec 4, 2023
@ibehnam
Copy link
Copy Markdown

ibehnam commented Dec 14, 2023

I just installed a fresh ooba on macOS and got accelerate not found with that line referenced.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants