xref: /aosp_15_r20/external/pytorch/torch/README.txt (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1Note [TH abstraction violation]
2~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4TH/THC provide some hpp headers, which are proper C++ headers rather than
5C headers.  These headers serve double duty as *internal implementation
6detail* headers, whose contents should largely not be used by external
7clients.
8
9Ideally, we would not install these headers at all; instead, you should
10use public functions (in headers like `THTensor.h`, NOT `THTensor.hpp`)
11to manipulate these structs.  However, there are a few places
12in torch/csrc where we violate this abstraction.  They are marked with
13a pointer to this note.  Each of those sites will have to be refactored
14when we refactor the guts of THTensor and related structures.
15