Skip to content

fix device selection for mps#65

Closed
xlr8harder wants to merge 1 commit intoxjdr-alt:mainfrom
xlr8harder:main
Closed

fix device selection for mps#65
xlr8harder wants to merge 1 commit intoxjdr-alt:mainfrom
xlr8harder:main

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