Caffe2 - C++ API
A deep learning, cross platform ML framework
python_tensor.h
1 #pragma once
2 
3 #include <torch/csrc/python_headers.h>
4 
5 namespace c10 {
6 struct Device;
7 }
8 
9 namespace at {
10 struct Type;
11 class Tensor;
12 } // namespace at
13 
14 namespace torch { namespace tensors {
15 
16 // Initializes the Python tensor type objects: torch.FloatTensor,
17 // torch.DoubleTensor, etc. and binds them in their containing modules.
18 void initialize_python_bindings();
19 
20 // Sets the concrete type constructed by calls to torch.Tensor() and most
21 // factory methods on the torch module.
22 void set_default_tensor_type(const at::Type& type);
23 
24 // Same as set_default_tensor_type() but takes a PyObject*
25 void py_set_default_tensor_type(PyObject* type_obj);
26 
27 // Same as py_set_default_tensor_type, but only changes the dtype (ScalarType).
28 void py_set_default_dtype(PyObject* dtype_obj);
29 
30 // Gets the ATen type object for the default tensor type. Note that the
31 // returned value will be a VariableType instance.
32 at::Type& get_default_tensor_type();
33 
34 }} // namespace torch::tensors
Definition: jit_type.h:17
To register your own kernel for an operator, do in one (!) cpp file: C10_REGISTER_KERNEL(OperatorHand...
Definition: alias_info.h:7
Flush-To-Zero and Denormals-Are-Zero mode.