Home
last modified time | relevance | path

Searched refs:NativeFunction (Results 1 – 25 of 46) sorted by relevance

12

/external/pytorch/torchgen/
Dcontext.py11 NativeFunction,
22 NativeFunction,
25 Union[NativeFunction, NativeFunctionsGroup],
26 Union[NativeFunction, NativeFunctionsViewGroup],
31 NativeFunction,
33 Optional[NativeFunction],
38 F3 = TypeVar("F3", Tuple[NativeFunction, Any], List[NativeFunction])
43 g: NativeFunctionsGroup | NativeFunctionsViewGroup | NativeFunction, argument
Dgen.py64 NativeFunction,
154 rs: list[NativeFunction] = []
163 func, m = NativeFunction.from_yaml(e, loc, valid_tags, ignore_keys)
254 def error_check_native_functions(funcs: Sequence[NativeFunction]) -> None: argument
255 func_map: dict[OperatorName, NativeFunction] = {}
256 base_func_map: dict[BaseOperatorName, list[NativeFunction]] = defaultdict(list)
336 f: NativeFunction, backend_index: BackendIndex argument
356 f: NativeFunction, backend_index: list[BackendIndex] argument
418 f: NativeFunction, argument
436 f: NativeFunction, argument
[all …]
Dgen_executorch.py45 NativeFunction,
81 f: NativeFunction, argument
127 is_custom_op: Callable[[NativeFunction], bool]
130 def __call__(self, f: NativeFunction) -> str | None: argument
187 unbox_kernel_entry: tuple[NativeFunction, tuple[ETKernelKey, BackendMetadata]], argument
189 f: NativeFunction = unbox_kernel_entry[0]
289 native_functions: Sequence[NativeFunction], argument
298 item: tuple[NativeFunction, tuple[ETKernelKey, BackendMetadata]] argument
302 items: list[tuple[NativeFunction, tuple[ETKernelKey, BackendMetadata]]] = [
333 g: NativeFunctionsGroup | NativeFunction, kernel_index: ETKernelIndex argument
[all …]
Dgen_backend_stubs.py22 NativeFunction,
41 grouped_native_functions: Sequence[NativeFunction | NativeFunctionsGroup],
44 native_functions_map: dict[OperatorName, NativeFunction] = {
47 lambda f: [f] if isinstance(f, NativeFunction) else list(f.functions()),
190 if isinstance(g, NativeFunction):
249 native_functions: Sequence[NativeFunction], argument
283 expected_backend_native_funcs: list[NativeFunction] = [
289 expected_backend_kernel_name_counts: dict[str, list[NativeFunction]] = defaultdict(
319 def create_decl(f: NativeFunction) -> str: argument
362 grouped_native_functions: Sequence[NativeFunction | NativeFunctionsGroup],
[all …]
Dgen_vmap_plumbing.py16 NativeFunction,
135 def gen_vmap_inplace_plumbing(native_function: NativeFunction) -> str | None: argument
179 def gen_vmap_plumbing_no_returns(native_function: NativeFunction) -> str: argument
200 def gen_vmap_plumbing(native_function: NativeFunction) -> str | None: argument
254 def __call__(self, f: NativeFunction) -> str | None: argument
259 def gen_all_vmap_plumbing(native_functions: Sequence[NativeFunction]) -> str: argument
Dgen_aoti_c_shim.py18 NativeFunction,
291 f: NativeFunction, argument
306 f: NativeFunction, argument
315 func: NativeFunction, argument
346 func: NativeFunction, argument
361 def get_fallback_op_name(func: NativeFunction) -> str: argument
370 func: NativeFunction, argument
413 func: NativeFunction, argument
426 native_functions: Sequence[NativeFunction], argument
Dgen_functionalization_type.py38 NativeFunction,
178 def modifies_arguments(f: NativeFunction) -> bool: argument
517 def maybe_create_output(f: NativeFunction, var_name: str) -> str: argument
529 f: NativeFunction, inner_return_var: str argument
549 f: NativeFunction, inner_return_var: str argument
557 f: NativeFunction, functional_op: NativeFunction, inner_return_var: str argument
617 f: NativeFunction, g: NativeFunctionsGroup argument
776 g: NativeFunction | NativeFunctionsGroup | NativeFunctionsViewGroup,
780 def emit_registration_helper(f: NativeFunction) -> str: argument
842 g: NativeFunction | NativeFunctionsGroup | NativeFunctionsViewGroup,
[all …]
Dnative_function_generation.py22 NativeFunction,
105 native_functions: Sequence[NativeFunction], argument
106 ) -> dict[FunctionSchema, dict[SchemaKind, NativeFunction]]:
108 FunctionSchema, dict[SchemaKind, NativeFunction]
270 f: NativeFunction, k: SchemaKind argument
271 ) -> tuple[NativeFunction, dict[DispatchKey, dict[OperatorName, BackendMetadata]]]:
338 NativeFunction(
380 rs: list[NativeFunction], argument
/external/pytorch/tools/autograd/
Dgen_trace_type.py10 from torchgen.model import Argument, NativeFunction, SchemaKind, TensorOptionsArguments
75 def should_trace(f: NativeFunction) -> bool: argument
112 def format_trace_op_name(f: NativeFunction) -> str: argument
141 def format_trace_inputs(f: NativeFunction) -> str: argument
299 def format_prerecord_trace(f: NativeFunction) -> str: argument
345 def format_postrecord_trace(f: NativeFunction) -> str: argument
379 def tie_return_values(f: NativeFunction) -> str: argument
386 def get_return_value(f: NativeFunction) -> str: argument
403 def emit_trace_body(f: NativeFunction) -> list[str]: argument
449 def type_wrapper_name(f: NativeFunction, key: str = "Default") -> str: argument
[all …]
Dgen_python_functions.py67 NativeFunction,
193 def should_generate_py_binding(f: NativeFunction) -> bool: argument
222 def is_py_variable_method(f: NativeFunction) -> bool: argument
226 def is_py_torch_function(f: NativeFunction) -> bool: argument
230 def is_py_nn_function(f: NativeFunction) -> bool: argument
234 def is_py_fft_function(f: NativeFunction) -> bool: argument
238 def is_py_linalg_function(f: NativeFunction) -> bool: argument
242 def is_py_nested_function(f: NativeFunction) -> bool: argument
246 def is_py_sparse_function(f: NativeFunction) -> bool: argument
250 def is_py_special_function(f: NativeFunction) -> bool: argument
[all …]
Dgen_inplace_or_view_type.py32 NativeFunction,
276 def inverse_view_name(f: NativeFunction) -> str: argument
284 def extract_bindings(f: NativeFunction) -> list[Binding]: argument
300 def unpack_args(f: NativeFunction) -> tuple[list[str], list[Binding]]: argument
337 def get_base_name(f: NativeFunction) -> str: argument
341 def get_view_info(f: NativeFunction) -> str | None: argument
350 f: NativeFunction, bindings: list[Binding], view_idx: str | None = None argument
521 def modifies_arguments(f: NativeFunction) -> bool: argument
572 def gen_formals(f: NativeFunction) -> str: argument
Dload_derivatives.py45 NativeFunction,
117 if isinstance(g, NativeFunction)
132 FunctionSchema, list[NativeFunction]
134 functions_by_schema: dict[str, NativeFunction] = {}
180 def cpp_arguments(f: NativeFunction) -> Sequence[Binding]: argument
189 f: NativeFunction, argument
236 f: NativeFunction, formula: str, names: tuple[str, ...] argument
273 f: NativeFunction, argument
445 functions_by_signature: dict[FunctionSchema, list[NativeFunction]], argument
446 functions_by_schema: dict[str, NativeFunction],
[all …]
Dgen_annotated_fn_args.py42 from torchgen.model import Argument, BaseOperatorName, NativeFunction
61 groups: dict[BaseOperatorName, list[NativeFunction]] = defaultdict(list)
82 def gen_annotated_args(f: NativeFunction) -> str: argument
Dgen_variable_factories.py14 from torchgen.model import NativeFunction, TensorOptionsArguments, Variant
63 def is_factory_function(f: NativeFunction) -> bool: argument
73 def process_function(f: NativeFunction) -> str | None: argument
/external/pytorch/tools/test/
Dtest_codegen.py26 NativeFunction,
216 self.custom_native_function, _ = NativeFunction.from_yaml(
224 ) = NativeFunction.from_yaml(
288 custom2_native_function, _ = NativeFunction.from_yaml(
321 self.op_1_native_function, op_1_backend_index = NativeFunction.from_yaml(
326 self.op_2_native_function, op_2_backend_index = NativeFunction.from_yaml(
364 self.assertIsInstance(self.op_1_native_function, NativeFunction)
385 self.native_functions: list[NativeFunction] = []
396 self.one_return_func, m = NativeFunction.from_yaml(
402 self.two_returns_func, two_returns_backend_index = NativeFunction.from_yaml(
[all …]
Dtest_executorch_custom_ops.py14 from torchgen.model import Location, NativeFunction
22 def _get_native_function_from_yaml(yaml_obj: dict[str, object]) -> NativeFunction:
23 native_function, _ = NativeFunction.from_yaml(
/external/executorch/backends/vulkan/test/op_tests/
Dgenerate_op_correctness_tests.py24 from torchgen.model import DispatchKey, NativeFunction
27 def registry_name(f: NativeFunction) -> str: argument
34 def construct_f_map(parsed_yaml: ParsedYaml) -> Dict[str, NativeFunction]:
35 f_map: Dict[str, NativeFunction] = {}
43 f_map: Dict[str, NativeFunction], argument
Dgenerate_op_benchmarks.py24 from torchgen.model import DispatchKey, NativeFunction
27 def registry_name(f: NativeFunction) -> str: argument
34 def construct_f_map(parsed_yaml: ParsedYaml) -> Dict[str, NativeFunction]:
35 f_map: Dict[str, NativeFunction] = {}
43 f_map: Dict[str, NativeFunction], argument
/external/pytorch/torchgen/dest/
Dlazy_ir.py38 NativeFunction,
176 def __call__(self, f: NativeFunctionsGroup | NativeFunction) -> list[str]: argument
415 def lazy_tensor_decls(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
462 func: NativeFunction, argument
473 def metrics(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
476 def get_device(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
494 def shape_inference(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
569 def build_ir_node(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
589 def return_aten_tensor(self, func: NativeFunction, schema: LazyIrSchema) -> str: argument
620 def __call__(self, func: NativeFunction) -> list[str]: argument
[all …]
Dnative_functions.py7 from torchgen.model import BackendIndex, NativeFunction, NativeFunctionsGroup
12 def gen_unstructured(f: NativeFunction, backend_index: BackendIndex) -> str | None: argument
45 g: NativeFunctionsGroup | NativeFunction, backend_index: BackendIndex argument
/external/pytorch/torchgen/executorch/api/
Dcustom_ops.py13 from torchgen.model import BaseTy, BaseType, DispatchKey, NativeFunction, Variant
27 def __call__(self, f: NativeFunction) -> str | None: argument
85 native_functions: Sequence[NativeFunction], argument
106 ns_grouped_native_functions: dict[str, list[NativeFunction]] = defaultdict(list)
/external/pytorch/tools/jit/
Dgen_unboxing.py20 from torchgen.model import Argument, NativeFunction, NativeFunctionsGroup, Variant
35 def __call__(self, f: NativeFunction) -> str: argument
99 def __call__(self, f: NativeFunction) -> str: argument
161 native_functions: Sequence[NativeFunction], argument
165 def key_func(fn: NativeFunction | NativeFunctionsGroup) -> str:
/external/executorch/backends/vulkan/test/op_tests/utils/
Dgen_correctness_vk.py16 from torchgen.model import NativeFunction
56 def __init__(self, op_reg_name: str, f: NativeFunction, inputs: VkTestSuite): argument
157 def add_suite(self, op_reg_name: str, f: NativeFunction, all_input_cases) -> None: argument
/external/pytorch/torchgen/executorch/
Dmodel.py15 NativeFunction,
143 def has_kernels(self, g: NativeFunction | NativeFunctionsGroup) -> bool:
148 self, g: NativeFunction | NativeFunctionsGroup
150 if isinstance(g, NativeFunction):
/external/pytorch/torchgen/api/
Dpython.py15 NativeFunction,
516 function: NativeFunction
530 base: NativeFunction
533 outplace: NativeFunction | None
633 def _cpp_signature(f: NativeFunction, *, method: bool = False) -> CppSignature: argument
637 def has_tensor_options(f: NativeFunction) -> bool: argument
743 f: NativeFunction, *, method: bool = False, pyi: bool = False argument
1106 ps: PythonSignature, f: NativeFunction, symint: bool = True argument
1181 def dispatch_lambda_return_str(f: NativeFunction) -> str: argument
1210 def cpp_dispatch_target(f: NativeFunction) -> str: argument
[all …]

12