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

Un-hardcode "cuda" as default device name #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akx
Copy link
Contributor

@akx akx commented Jul 19, 2023

Allow configuring with SGM_DEFAULT_DEVICE (but default to CUDA when available).

This ought to make the repo a little bit easier to use with e.g. Apple Silicon; you can set SGM_DEFAULT_DEVICE=mps and go to town.

Refs #6.

This does not touch the Streamlit demo, which is still hard-coded to use cuda in many places.

@akx
Copy link
Contributor Author

akx commented Jul 25, 2023

@benjaminaubin Rebased 🧹

@akx akx mentioned this pull request Jul 25, 2023
@akx akx force-pushed the un-hardcode-cuda branch from 82afdc2 to 51fbd29 Compare July 27, 2023 07:29
@akx
Copy link
Contributor Author

akx commented Jul 27, 2023

@benjaminaubin ... and rebased again 🧹

@akx akx force-pushed the un-hardcode-cuda branch from 51fbd29 to e2371af Compare July 27, 2023 09:48
@akx akx mentioned this pull request Jul 27, 2023
@akx akx force-pushed the un-hardcode-cuda branch from e2371af to fafea56 Compare July 27, 2023 09:53
@akx
Copy link
Contributor Author

akx commented Jul 27, 2023

Noticed a couple more spots where "cuda" was the default (or where autocast was used without a guard; it doesn't work on e.g. "mps").

Also, rebased.

@akx
Copy link
Contributor Author

akx commented Nov 22, 2023

Rebased on 059d8e9.

Allow configuring with `SGM_DEFAULT_DEVICE`
@akx akx force-pushed the un-hardcode-cuda branch from 021f12a to d0f60b1 Compare December 5, 2023 08:40
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.

1 participant