[inductor] Move AOTInductor runtime headers (#108564)

Summary: Move AOTInductor runtime header files into its own subdirectory, to separate them from to-be-added libtorch C interface.

Reviewed By: frank-wei

Differential Revision: D48905038

Pull Request resolved: https://github.com/pytorch/pytorch/pull/108564
Approved by: https://github.com/frank-wei
This commit is contained in:
Bin Bao 2023-09-06 11:50:41 +00:00 committed by PyTorch MergeBot
parent b60273b88a
commit 60bd30ee0b
10 changed files with 12 additions and 11 deletions

View File

@ -1149,7 +1149,7 @@ class AOTInductorModelCache:
# Use a utility function for easier benchmarking
source = """
#include <torch/csrc/inductor/aot_inductor_model.h>
#include <torch/csrc/inductor/aot_runtime/model.h>
torch::aot_inductor::AOTInductorModel model;

View File

@ -1291,6 +1291,7 @@ def main():
"include/torch/csrc/distributed/autograd/rpc_messages/*.h",
"include/torch/csrc/dynamo/*.h",
"include/torch/csrc/inductor/*.h",
"include/torch/csrc/inductor/aot_runtime/*.h",
"include/torch/csrc/jit/*.h",
"include/torch/csrc/jit/backends/*.h",
"include/torch/csrc/jit/generated/*.h",
@ -1333,8 +1334,8 @@ def main():
"include/THH/*.h*",
"include/THH/generic/*.h",
"include/sleef.h",
"_inductor/codegen/*.cpp",
"_inductor/codegen/*.h",
"_inductor/codegen/aot_runtime/*.cpp",
"share/cmake/ATen/*.cmake",
"share/cmake/Caffe2/*.cmake",
"share/cmake/Caffe2/public/*.cmake",

View File

@ -3,7 +3,7 @@
#include <vector>
#include <c10/cuda/CUDAStream.h>
#include <torch/csrc/inductor/aot_inductor_interface.h>
#include <torch/csrc/inductor/aot_runtime/interface.h>
#include <torch/torch.h>
namespace torch {

View File

@ -37,7 +37,7 @@ class AOTInductorModelRunner:
# Use a utility function for easier testing
source = """
#include <torch/csrc/inductor/aot_inductor_model.h>
#include <torch/csrc/inductor/aot_runtime/model.h>
torch::aot_inductor::AOTInductorModel model;

View File

@ -1,8 +1,8 @@
#include <torch/csrc/inductor/aot_inductor_interface.h>
#include <torch/csrc/inductor/aot_inductor_model_container.h>
#include <torch/csrc/inductor/aot_runtime/interface.h>
#include <torch/csrc/inductor/aot_runtime/model_container.h>
#include <ATen/core/dispatch/Dispatcher.h>
#include <iostream>
#include <torch/csrc/inductor/proxy_executor.h>
#include <torch/csrc/inductor/aot_runtime/proxy_executor.h>
#include <stdexcept>
#include <vector>

View File

@ -930,7 +930,7 @@ class CppWrapperCodeGen(WrapperCodeGen):
def write_header(self):
if V.graph.aot_mode:
with open(
os.path.join(os.path.dirname(__file__), "aot_inductor_interface.cpp")
os.path.join(os.path.dirname(__file__), "aot_runtime", "interface.cpp")
) as f:
self.header.splice(f.read())
else:

View File

@ -7,7 +7,7 @@
#include <ATen/ATen.h>
#include <c10/cuda/CUDAGuard.h>
#include <torch/csrc/inductor/proxy_executor.h>
#include <torch/csrc/inductor/aot_runtime/proxy_executor.h>
#define AOT_VECTOR_SIZE_CHECK(vec, expected_size) \
{ \

View File

@ -4,8 +4,8 @@
#include <mutex>
#include <shared_mutex>
#include <torch/csrc/inductor/aot_inductor_model.h>
#include <torch/csrc/inductor/proxy_executor.h>
#include <torch/csrc/inductor/aot_runtime/model.h>
#include <torch/csrc/inductor/aot_runtime/proxy_executor.h>
namespace torch {
namespace aot_inductor {