|
30 | 30 | # message, but use what's there
|
31 | 31 | #
|
32 | 32 |
|
33 |
| -from collections import defaultdict |
34 | 33 | import itertools
|
35 | 34 | import re
|
36 |
| -import yaml |
| 35 | +from collections import defaultdict |
37 | 36 |
|
38 |
| -from .gen_trace_type import should_trace |
| 37 | +from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple |
39 | 38 |
|
40 |
| -from torchgen.code_template import CodeTemplate |
| 39 | +import yaml |
41 | 40 | from torchgen.api import cpp
|
42 |
| -from torchgen.api.types import CppSignatureGroup |
43 | 41 | from torchgen.api.python import (
|
44 |
| - PythonArgument, |
45 |
| - PythonSignature, |
46 |
| - PythonSignatureDeprecated, |
47 |
| - PythonSignatureGroup, |
48 |
| - PythonSignatureNativeFunctionPair, |
49 | 42 | arg_parser_output_exprs,
|
50 | 43 | argument_type_str,
|
51 | 44 | cpp_dispatch_exprs,
|
|
55 | 48 | dispatch_lambda_return_str,
|
56 | 49 | has_tensor_options,
|
57 | 50 | namedtuple_fieldnames,
|
| 51 | + PythonArgument, |
| 52 | + PythonSignature, |
| 53 | + PythonSignatureDeprecated, |
| 54 | + PythonSignatureGroup, |
| 55 | + PythonSignatureNativeFunctionPair, |
58 | 56 | signature,
|
59 | 57 | )
|
60 |
| -from torchgen.gen import cpp_string, parse_native_yaml, parse_tags_yaml |
| 58 | +from torchgen.api.types import CppSignatureGroup |
| 59 | + |
| 60 | +from torchgen.code_template import CodeTemplate |
61 | 61 | from torchgen.context import with_native_function
|
62 |
| -from torchgen.model import ( |
63 |
| - Argument, |
64 |
| - BaseOperatorName, |
65 |
| - NativeFunction, |
66 |
| - Type, |
67 |
| - Variant, |
68 |
| -) |
69 |
| -from torchgen.utils import split_name_params, YamlLoader, FileManager |
| 62 | +from torchgen.gen import cpp_string, parse_native_yaml, parse_tags_yaml |
| 63 | +from torchgen.model import Argument, BaseOperatorName, NativeFunction, Type, Variant |
| 64 | +from torchgen.utils import FileManager, split_name_params, YamlLoader |
70 | 65 |
|
71 |
| -from typing import Dict, Optional, List, Tuple, Set, Sequence, Callable |
| 66 | +from .gen_trace_type import should_trace |
72 | 67 |
|
73 | 68 | #
|
74 | 69 | # declarations blocklist
|
|
0 commit comments