PyTorch
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Functions
DeviceGuard.h File Reference
#include <ATen/core/IListRef.h>
#include <ATen/core/Tensor.h>
#include <c10/core/DeviceGuard.h>
#include <c10/core/ScalarType.h>

Go to the source code of this file.

Namespaces

namespace  at
 

Functions

c10::optional< Device > at::device_of (const Tensor &t)
 Return the Device of a Tensor, if the Tensor is defined. More...
 
c10::optional< Device > at::device_of (const c10::optional< Tensor > &t)
 
c10::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. More...