|
29 | 29 | TORCH_INCLUDE_DIR = TORCH_DIR |
30 | 30 | TORCHGEN_DIR = Path(torchgen.__path__[0]).resolve() |
31 | 31 | TORCH_MLIR_DIR = Path(__file__).resolve().parent.parent |
32 | | -TORCH_MLIR_PT1_DIR = TORCH_MLIR_DIR / "projects" / "pt1" |
33 | 32 |
|
34 | 33 | def reindent(text, prefix=""): |
35 | 34 | return indent(dedent(text), prefix) |
@@ -114,12 +113,12 @@ def __init__(self, binary_dir): |
114 | 113 | self.binary_dir = Path(binary_dir) |
115 | 114 | assert self.binary_dir.is_dir(), f"Binary directory not found: {self.binary_dir}" |
116 | 115 | self.source_yaml = self.binary_dir.joinpath("generated_native_functions.yaml") |
117 | | - self.backend_path = TORCH_MLIR_PT1_DIR.joinpath( |
118 | | - "python", "torch_mlir", "csrc", "base_lazy_backend" |
| 116 | + self.backend_path = TORCH_MLIR_DIR.joinpath( |
| 117 | + "projects", "ltc", "csrc", "base_lazy_backend" |
119 | 118 | ) |
120 | 119 | assert self.backend_path.is_dir(), f"Backend path not found: {self.backend_path}" |
121 | 120 | self.generated_path = self.binary_dir.joinpath( |
122 | | - "projects", "pt1", "python", "torch_mlir", "csrc", "base_lazy_backend", "generated" |
| 121 | + "projects", "ltc", "csrc", "base_lazy_backend", "generated" |
123 | 122 | ) |
124 | 123 | self.generated_path.mkdir(parents=True, exist_ok=True) |
125 | 124 |
|
@@ -415,7 +414,7 @@ def extract_signatures(text): |
415 | 414 | // for ops that dont have a corresponding structured kernel or shape definition |
416 | 415 |
|
417 | 416 | #include "shape_inference.h" |
418 | | - #include "torch_mlir/csrc/base_lazy_backend/utils/exception.h" |
| 417 | + #include "base_lazy_backend/utils/exception.h" |
419 | 418 | namespace torch {{ |
420 | 419 | namespace lazy {{ |
421 | 420 | {} |
@@ -467,7 +466,7 @@ def gen_fallback_code(*args, **kwargs): |
467 | 466 | node_base="torch::lazy::TorchMlirNode", |
468 | 467 | node_base_hdr=str(self.backend_path.joinpath("mlir_node.h")), |
469 | 468 | tensor_class=self.tensor_class, |
470 | | - tensor_class_hdr="torch_mlir/csrc/base_lazy_backend/tensor.h", |
| 469 | + tensor_class_hdr="base_lazy_backend/tensor.h", |
471 | 470 | create_aten_from_ltc_tensor="CreateFunctionalizedAtenFromLtcTensor", |
472 | 471 | shape_inference_hdr=str(self.generated_path.joinpath("shape_inference.h")), |
473 | 472 | lazy_ir_generator=GenMlirLazyIr, |
|
0 commit comments