Skip to content

Document the difference between device= vs .to(device) #8861

@tengyifei

Description

@tengyifei

📚 Documentation

There's a subtle difference between torch.foo(device=xla) vs torch.foo().to(xla) and we should document this in a FAQ section or similar. The first one runs the foo on the TPU. The second one runs the foo on the CPU and then moves the buffer to the TPU.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions