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

Move CUDA tensors to CPU before moving to XLA. #6060

Merged
merged 3 commits into from
Dec 8, 2023

Conversation

ysiraichi
Copy link
Collaborator

Fix: #6010

This PR moves non-CPU tensors to CPU, before actually moving them to XLA. This is needed because PjRtClient::BufferFromHostBuffer (used inside TransferToServer) assumes the source tensor is in CPU.

cc @JackCaoG @miladm

@JackCaoG JackCaoG requested a review from will-cromar December 8, 2023 18:22
Copy link
Collaborator

@will-cromar will-cromar left a comment

Choose a reason for hiding this comment

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

Good catch. I'm surprised this didn't get caught in our CI. Thanks for adding a test too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[torchbench] Moving models from CUDA to XLA raise segmentation fault.
2 participants