mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 21:49:24 +08:00
[BE][Easy] enable postponed annotations in tools
(#129375)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
2e3ff394bf
commit
59eb2897f1
@ -1,8 +1,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any, cast, Optional
|
||||
from typing import Any, cast
|
||||
|
||||
import yaml
|
||||
|
||||
@ -20,10 +22,10 @@ TAGS_PATH = "aten/src/ATen/native/tags.yaml"
|
||||
|
||||
def generate_code(
|
||||
gen_dir: Path,
|
||||
native_functions_path: Optional[str] = None,
|
||||
tags_path: Optional[str] = None,
|
||||
install_dir: Optional[str] = None,
|
||||
subset: Optional[str] = None,
|
||||
native_functions_path: str | None = None,
|
||||
tags_path: str | None = None,
|
||||
install_dir: str | None = None,
|
||||
subset: str | None = None,
|
||||
disable_autograd: bool = False,
|
||||
force_schema_registration: bool = False,
|
||||
operator_selector: Any = None,
|
||||
@ -105,8 +107,8 @@ def get_selector_from_legacy_operator_selection_list(
|
||||
|
||||
|
||||
def get_selector(
|
||||
selected_op_list_path: Optional[str],
|
||||
operators_yaml_path: Optional[str],
|
||||
selected_op_list_path: str | None,
|
||||
operators_yaml_path: str | None,
|
||||
) -> Any:
|
||||
# cwrap depends on pyyaml, so we can't import it earlier
|
||||
REPO_ROOT = Path(__file__).absolute().parents[2]
|
||||
|
Reference in New Issue
Block a user