mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/112882 Approved by: https://github.com/malfet, https://github.com/sammcj
22 lines
539 B
C
22 lines
539 B
C
#pragma once
|
|
|
|
#include <torch/csrc/utils/python_compat.h>
|
|
|
|
// Functions that need to be copied from the CPython source
|
|
// should go in cpython_defs.c. Copying is required when, e.g.,
|
|
// we need to call internal CPython functions that are not exposed.
|
|
|
|
#if IS_PYTHON_3_11_PLUS
|
|
|
|
#include <internal/pycore_frame.h>
|
|
|
|
int THP_PyFrame_FastToLocalsWithError(_PyInterpreterFrame* frame);
|
|
|
|
PyFunctionObject* _PyFunction_CopyWithNewCode(
|
|
PyFunctionObject* o,
|
|
PyCodeObject* code);
|
|
|
|
void THP_PyFrame_Clear(_PyInterpreterFrame* frame);
|
|
|
|
#endif
|