mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Summary: Fixes https://github.com/pytorch/pytorch/issues/67852 cc ezyang bhosmer smessmer ljk53 bdhirsh Pull Request resolved: https://github.com/pytorch/pytorch/pull/68556 Reviewed By: ejguan Differential Revision: D32652758 Pulled By: ngimel fbshipit-source-id: 170956fca112606f9008abe09b92c6ddc411be09
33 lines
823 B
C++
33 lines
823 B
C++
#include <torch/csrc/python_headers.h>
|
|
#ifdef _MSC_VER
|
|
#include <c10/util/win32-headers.h>
|
|
#endif
|
|
#include <structmember.h>
|
|
|
|
#include <TH/TH.h>
|
|
// See Note [TH abstraction violation]
|
|
// - Used to get at the allocator associated with a storage
|
|
#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 <c10/core/CPUAllocator.h>
|
|
|
|
#include <fmt/format.h>
|
|
|
|
// NOLINTNEXTLINE(bugprone-suspicious-include)
|
|
#include <torch/csrc/generic/Storage.cpp>
|
|
#include <TH/THGenerateByteType.h>
|
|
|
|
#include <c10/util/intrusive_ptr.h>
|
|
|
|
template<>
|
|
void THPPointer<c10::StorageImpl>::free() {
|
|
if (ptr) {
|
|
c10::raw::intrusive_ptr::decref(ptr);
|
|
}
|
|
}
|