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

Spice mix gpu #231

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Spice mix gpu #231

merged 2 commits into from
Mar 6, 2024

Conversation

Jieran-S
Copy link
Member

@Jieran-S Jieran-S commented Feb 26, 2024

Attempts to fix issue #225: make cpu available for the current pipeline.

Check issue for detailed description

@niklasmueboe
Copy link
Collaborator

If we check if gpu is available I think we can also remove the "device" from the config.

Is specifying the device number necessary, i.e.e does it need to be "cuda:0"?

@Jieran-S
Copy link
Member Author

Agree. Will remove the device from config.

I have the same question regarding the device number. I think @alam-shahul made those specifications in the first place.

@alam-shahul
Copy link
Contributor

I think that cuda means the same thing as cuda:0 to PyTorch, so it is okay to just use cuda if that is preferred: https://discuss.pytorch.org/t/difference-between-cuda-0-vs-cuda-with-1-gpu/93080

Copy link
Contributor

@alam-shahul alam-shahul left a comment

Choose a reason for hiding this comment

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

I guess another way to do this would be to just leave the "device" field out from the config file if there is no GPU; this would use the "cpu" device by default, as per line 163: https://github.com/SpatialHackathon/SpaceHack2023/pull/231/files#diff-5615d1512910769a2c993538dc9bf8b5f2dfa026b30bb3ea874b5d9950cf6a9aL163

@Jieran-S
Copy link
Member Author

Jieran-S commented Mar 5, 2024

Thank you for the comment! Since SpiceMix should be used in GPU, it would be nice to explicitly set the device (cuda) in config and only use CPU as a secondary option when cuda is not available. So I changed the code accordingly.

@Jieran-S Jieran-S merged commit 216aa1e into main Mar 6, 2024
@peicai peicai mentioned this pull request Jun 25, 2024
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