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

Fixed issue where 'exog' was not moved to GPU memory when using cuda #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

FlyingFish800
Copy link

@FlyingFish800 FlyingFish800 commented Aug 16, 2023

I ran into an issue using this library on ubuntu with a CUDA enabled GPU with the error:
Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat2 in method wrapper_CUDA_mm)
I traced the issue back to lines 309 and 313 of _utils.py where exog was not sent to DEVICE, unlike offsets and latent_mean. I added device=DEVICE to both instances where exog could be created.

I then found several instances where self.latent_variables was not moved back to CPU memory for use in visualization features, and fixed these so all the code in the provided Getting Started notebook would run without producing the above error.

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