Rate this Page

Function at::device_of(const Tensor&)#

Function Documentation#

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

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