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

fix device selection for mps #65

Closed
wants to merge 1 commit into from
Closed

Conversation

xlr8harder
Copy link

This was causing the kvcache to end up on cpu on mps.

This doesn't entirely fix mac: the pyproject.toml tries to force a cuda version of torch, but I don't know the pyproject format well enough to know how to fix that cleanly.

@xlr8harder
Copy link
Author

Ah I see there is already a pending PR with this fix: #41

@xlr8harder xlr8harder closed this Oct 10, 2024
@artus-LYTiQ
Copy link

o7 xlr8!

Try the following. toml line 18:

torch = [ {version = "^2.4.1", source = "pypi", markers = "platform_system == 'Darwin'"}, {version = "^2.4.1", source = "pytorch", extras = ["+cu124"], markers = "platform_system != 'Darwin'"} ]

Then add before or behind the other .source:

[[tool.poetry.source]] name = "pypi" priority = "primary"

with the respective line breaks of course. HTH

@xlr8harder
Copy link
Author

oh, thanks! and that won't break the cuda installs separately?

@xlr8harder
Copy link
Author

You should probably submit that fix as a separate PR!

@artus-LYTiQ
Copy link

I honestly still have to test it on ubuntu+4090 but I am still stuck in the jax-metal PR.

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.

2 participants