mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
This reverts commit 1faf6367e396b1d0894e8735912a47ac465f469d. Reverted https://github.com/pytorch/pytorch/pull/163340 on behalf of https://github.com/wdvr due to temporary revert to pull out #162659 ([comment](https://github.com/pytorch/pytorch/pull/163340#issuecomment-3317105243))
18 lines
476 B
C
18 lines
476 B
C
#include <torch/csrc/utils/python_compat.h>
|
|
#if defined(_WIN32) && IS_PYTHON_3_11_PLUS
|
|
#define Py_BUILD_CORE
|
|
#define NEED_OPCODE_TABLES // To get _PyOpcode_Deopt, _PyOpcode_Caches
|
|
|
|
#if IS_PYTHON_3_13_PLUS
|
|
#include <cpython/code.h> // To get PyUnstable_Code_GetFirstFree
|
|
#define NEED_OPCODE_METADATA
|
|
#include "internal/pycore_opcode_metadata.h"
|
|
#undef NEED_OPCODE_METADATA
|
|
#else
|
|
#include "internal/pycore_opcode.h"
|
|
#endif
|
|
|
|
#undef NEED_OPCODE_TABLES
|
|
#undef Py_BUILD_CORE
|
|
#endif
|