Shortcuts

Function at::device_of(const Tensor&)

Function Documentation

inline c10::optional<Device> at::device_of(const Tensor &t)

Return the Device of a Tensor, if the Tensor is defined.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources