1 #include <torch/csrc/jit/hooks_for_testing.h> 2 #include <torch/csrc/jit/script/module.h> 7 static std::function<void(std::shared_ptr<script::Module> module)>
9 TORCH_API
void didFinishEmitModule(std::shared_ptr<script::Module> module) {
10 if (emit_module_callback) {
11 emit_module_callback(std::move(module));
14 TORCH_API
void setEmitModuleHook(
15 std::function<
void(std::shared_ptr<script::Module> module)> cb) {
16 emit_module_callback = std::move(cb);