1 | #ifndef THP_H |
---|---|
2 | #define THP_H |
3 | |
4 | #include <torch/csrc/Export.h> |
5 | #include <torch/csrc/python_headers.h> |
6 | |
7 | // Back-compatibility macros, Thanks to http://cx-oracle.sourceforge.net/ |
8 | // define PyInt_* macros for Python 3.x. NB: We must include Python.h first, |
9 | // otherwise we'll incorrectly conclude PyInt_Check isn't defined! |
10 | #ifndef PyInt_Check |
11 | #define PyInt_Check PyLong_Check |
12 | #define PyInt_FromLong PyLong_FromLong |
13 | #define PyInt_AsLong PyLong_AsLong |
14 | #define PyInt_Type PyLong_Type |
15 | #endif |
16 | |
17 | #include <torch/csrc/Exceptions.h> |
18 | #include <torch/csrc/Generator.h> |
19 | #include <torch/csrc/Module.h> |
20 | #include <torch/csrc/Size.h> |
21 | #include <torch/csrc/Storage.h> |
22 | #include <torch/csrc/Types.h> |
23 | #include <torch/csrc/utils.h> // This requires defined Storage and Tensor types |
24 | #include <torch/csrc/utils/byte_order.h> |
25 | |
26 | #include <torch/csrc/serialization.h> |
27 | |
28 | #include <torch/csrc/autograd/python_autograd.h> |
29 | |
30 | #endif |
31 |