xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/codegen/fuser/executor.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <ATen/core/stack.h>
4 #include <torch/csrc/Export.h>
5 #include <torch/csrc/jit/codegen/fuser/fused_kernel.h>
6 #include <torch/csrc/jit/codegen/fuser/kernel_spec.h>
7 
8 #include <cstdint>
9 
10 namespace torch::jit::fuser {
11 
12 // Runs the fusion associated with the key (see registerFusion() in interface.h)
13 // on the inputs taken from the given Stack.
14 TORCH_API bool runFusion(
15     const int64_t key,
16     Stack& stack,
17     std::string* code_out = nullptr);
18 
19 } // namespace torch::jit::fuser
20