3 #include <torch/csrc/python_headers.h> 4 #include <torch/csrc/WindowsTorchApiMacro.h> 6 #include <ATen/Device.h> 14 TORCH_API
extern PyTypeObject THPDeviceType;
16 inline bool THPDevice_Check(PyObject *obj) {
17 return Py_TYPE(obj) == &THPDeviceType;
20 PyObject * THPDevice_New(
const at::Device& device);
22 void THPDevice_init(PyObject *module);
Represents a a compute device on which a tensor is located.