Rate this Page

Function at::device_of(ITensorListRef)#

Function Documentation#

inline std::optional<Device> at::device_of(ITensorListRef t)#

Return the Device of a TensorList, if the list is non-empty and the first Tensor is defined.

(This function implicitly assumes that all tensors in the list have the same device.)