diff --git a/tools/setup_helpers/generate_code.py b/tools/setup_helpers/generate_code.py index 3a218e3c00f16..bc4e0bc04a95b 100644 --- a/tools/setup_helpers/generate_code.py +++ b/tools/setup_helpers/generate_code.py @@ -3,7 +3,7 @@ import pathlib import sys import yaml -from typing import Any, List, Optional, cast +from typing import Any, Optional, cast try: # use faster C loader if available @@ -11,22 +11,8 @@ except ImportError: from yaml import SafeLoader as YamlLoader # type: ignore[misc] -source_files = {".py", ".cpp", ".h"} - NATIVE_FUNCTIONS_PATH = "aten/src/ATen/native/native_functions.yaml" -# TODO: This is a little inaccurate, because it will also pick -# up setup_helper scripts which don't affect code generation -def all_generator_source() -> List[str]: - r = [] - for directory, _, filenames in os.walk("tools"): - for f in filenames: - if os.path.splitext(f)[1] in source_files: - full = os.path.join(directory, f) - r.append(full) - return sorted(r) - - def generate_code( ninja_global: Optional[str] = None, native_functions_path: Optional[str] = None,