[jit] Replace get_executor() with call() in abstract Function interface. (#65969)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65969

ghstack-source-id: 141759210

Test Plan: no behavior change.

Reviewed By: anjali411

Differential Revision: D31326151

fbshipit-source-id: 201f6dc4c23fdb2531f6b8c73d26127f9e212de4
This commit is contained in:
Zhengxu Chen
2021-10-28 13:10:13 -07:00
committed by Facebook GitHub Bot
parent 8363da3f92
commit 5ef62c88a9
8 changed files with 85 additions and 74 deletions

View File

@ -1442,12 +1442,16 @@ void initJitScriptBindings(PyObject* module) {
.def(
"get_debug_state",
[](const StrongFunctionPtr& self) {
return self.function_->get_executor().getDebugState();
return toGraphFunction(*self.function_)
.get_executor()
.getDebugState();
})
.def(
"_debug_flush_compilation_cache",
[](const StrongFunctionPtr& self) {
return self.function_->get_executor().debugFlushCompilationCache();
toGraphFunction(*self.function_)
.get_executor()
.debugFlushCompilationCache();
})
.def_property_readonly(
"name",