pytorch/torch/csrc/dynamo/eval_frame_cpp.h
William Wen 40b3e4a358 [dynamo] expose code execution strategy to python (#148020)
@anijain2305 this can be used to mark a code object to be skipped/run-only (recursively) while tracing.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/148020
Approved by: https://github.com/jansel
2025-02-28 21:59:12 +00:00

26 lines
471 B
C

#pragma once
#include <Python.h>
#include <torch/csrc/dynamo/eval_frame.h>
#include <torch/csrc/dynamo/extra_state.h>
#include <torch/csrc/dynamo/framelocals_mapping.h>
#ifdef __cplusplus
extern "C" {
#endif
PyObject* dynamo__custom_eval_frame(
PyThreadState* tstate,
THP_EVAL_API_FRAME_OBJECT* frame,
int throw_flag,
PyObject* callback);
PyObject* set_code_exec_strategy(PyObject* dummy, PyObject* obj);
#ifdef __cplusplus
} // extern "C"
#endif