mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: Fixes https://github.com/pytorch/pytorch/issues/67466 Pull Request resolved: https://github.com/pytorch/pytorch/pull/67480 Reviewed By: mruberry Differential Revision: D32023494 Pulled By: ngimel fbshipit-source-id: 8827e1d6e765fee7219b5ee9888a1a3e3c5fbe89
33 lines
787 B
C++
33 lines
787 B
C++
#include <torch/csrc/python_headers.h>
|
|
#ifdef _MSC_VER
|
|
#include <c10/util/win32-headers.h>
|
|
#endif
|
|
#include <structmember.h>
|
|
|
|
#define THP_HOST_HALF
|
|
|
|
#include <TH/TH.h>
|
|
// See Note [TH abstraction violation]
|
|
// - Used to get at the allocator associated with a storage
|
|
#include <TH/THStorageFunctions.hpp>
|
|
#include <libshm.h>
|
|
#include <torch/csrc/THP.h>
|
|
#include <torch/csrc/copy_utils.h>
|
|
#include <torch/csrc/DynamicTypes.h>
|
|
#include <torch/csrc/CudaIPCTypes.h>
|
|
#include <torch/csrc/Device.h>
|
|
#include <torch/csrc/autograd/utils/wrap_outputs.h>
|
|
|
|
#include <fmt/format.h>
|
|
|
|
// NOLINTNEXTLINE(bugprone-suspicious-include)
|
|
#include <torch/csrc/generic/Storage.cpp>
|
|
#include <TH/THGenerateByteType.h>
|
|
|
|
template<>
|
|
void THPPointer<THStorage>::free() {
|
|
if (ptr) {
|
|
THStorage_free(ptr);
|
|
}
|
|
}
|