mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "[BE][Easy] replace import pathlib
with from pathlib import Path
(#129426)"
This reverts commit 6d75604ef135925e8c85363c2f4a5e0b6f7fef28. Reverted https://github.com/pytorch/pytorch/pull/129426 on behalf of https://github.com/XuehaiPan due to recognize `Path` as new exported API ([comment](https://github.com/pytorch/pytorch/pull/129426#issuecomment-2198371625))
This commit is contained in:
@ -2,8 +2,8 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
from collections import namedtuple
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, Iterable, Iterator, Sequence
|
||||
|
||||
import yaml
|
||||
@ -252,7 +252,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__).parent.parent.parent.absolute()
|
||||
torch_root = pathlib.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:
|
||||
|
Reference in New Issue
Block a user