Revert "[BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374)"

This reverts commit 2293fe1024812d6349f6e2b3b7de82c6b73f11e4.

Reverted https://github.com/pytorch/pytorch/pull/129374 on behalf of https://github.com/malfet due to failing internal ROCM builds with error: ModuleNotFoundError: No module named hipify ([comment](https://github.com/pytorch/pytorch/pull/129374#issuecomment-2562973920))
This commit is contained in:
PyTorch MergeBot
2024-12-26 17:32:23 +00:00
parent cc4e70b7c3
commit 475656fd9c
62 changed files with 133 additions and 119 deletions

View File

@ -256,7 +256,7 @@ def main() -> None:
options = parser.parse_args()
# Assumes that this file lives at PYTORCH_ROOT/torchgen/gen_backend_stubs.py
torch_root = Path(__file__).absolute().parents[2]
torch_root = Path(__file__).parent.parent.parent.absolute()
aten_path = str(torch_root / "aten" / "src" / "ATen")
lazy_ir_generator: type[GenLazyIR] = default_args.lazy_ir_generator
if options.gen_ts_lowerings: