/aosp_15_r20/external/pytorch/test/ |
H A D | test_functionalization.py | 246 view_copy = torch.ops.aten.view_copy.default(arg0_1, [1, 1024, 128, 128]); arg0_1 = None 247 clone = torch.ops.aten.clone.default(view_copy); view_copy = None 248 view_copy_1 = torch.ops.aten.view_copy.default(clone, [16, 64, 128, 128]) 250 view_copy_2 = torch.ops.aten.view_copy.default(relu, [1, 1024, 128, 128]); relu = None 251 …view_copy_3 = torch.ops.aten.view_copy.default(view_copy_2, [16, 64, 128, 128]); view_copy_2 = No… 252 …view_copy_4 = torch.ops.aten.view_copy.default(clone, [16, 64, 128, 128]); clone = view_copy_4 = … 256 …view_copy_5 = torch.ops.aten.view_copy.default(expand_copy, [1, 1024, 128, 128]); expand_copy = N… 259 view_copy_6 = torch.ops.aten.view_copy.default(copy, [16, 64, 128, 128]); view_copy_6 = None 260 view_copy_7 = torch.ops.aten.view_copy.default(copy, [16, 64, 128, 128]) 264 view_copy_8 = torch.ops.aten.view_copy.default(copy_1, [1, 1024, 128, 128]); copy_1 = None [all …]
|
/aosp_15_r20/external/executorch/backends/qualcomm/_passes/ |
H A D | convert_to_linear.py | 32 view_copy = exir_ops.edge.aten.view_copy.default variable in ConvertToLinear 42 {view_copy: 2, permute_copy: 1, addmm: 1}, 47 {view_copy: 3, permute_copy: 1, expand_copy: 2, add: 1, bmm: 1}, 48 {view_copy: 3, permute_copy: 1, expand_copy: 2, bmm: 1}, 52 {view_copy: 2, permute_copy: 1, mm: 1}, 88 # qnn htp does not support keepdim, the view_copy(reshape) should exist for now 120 self.view_copy, 140 self.view_copy, 178 # weight -> expand_copy -> view_copy -> input of bmm 180 # input -> expand_copy -> view_copy -> input of bmm
|
H A D | convert_bmm_to_matmul.py | 22 view_copy = exir_ops.edge.aten.view_copy.default variable in ConvertBmmToMatmul 28 {expand_copy: 2, view_copy: 3, bmm: 1}, 29 {expand_copy: 2, view_copy: 3, bmm: 1, clone: 1},
|
/aosp_15_r20/external/executorch/exir/passes/ |
H A D | normalize_view_copy_base_pass.py | 19 torch.ops.aten.view_copy.default, 20 ops.edge.aten.view_copy.default, 26 Point each view_copy to the first upstream non-view. 28 After this pass, the base of each view_copy is not a view_copy. 31 view_copy nodes. 44 # Base's base will not be a view_copy because we iterate 52 logging.debug(f"Updated the base on {n_updated} view_copy nodes.")
|
H A D | replace_view_copy_with_view_pass.py | 31 torch.ops.aten.view_copy.default, 32 ops.edge.aten.view_copy.default, 264 This pass replaces view_copy nodes with view nodes. 276 # Note: We only replace view_copy nodes that are not output, since 295 logger.debug(f"Replaced {n_replaced} view_copy nodes with {_VIEW_OP} nodes.") 303 # Note: We only replace view_copy nodes that are not output, since 314 We check that all view_copy nodes have been normalized. 320 # Note: We only replace view_copy nodes that are not output, since
|
/aosp_15_r20/external/pytorch/torchgen/ |
H A D | gen_functionalization_type.py | 86 # Generates view_copy() composite kernels for all view_copy operators. 90 # See Note [view_copy NativeFunctions] 97 if g.view_copy is None: 99 elif g.view_copy.func.name.name.base != f"{g.view.func.name.name}_copy": 100 # If the view_copy doesn't match the standard naming scheme of <op>_copy, 106 metadata = self.backend_index.get_kernel(g.view_copy) 109 # We can make view_copy work in more cases by using reshape() 113 if str(g.view_copy.func.name) == "view_copy": 126 # view_copy is a native signature, since we're generating an at::native:: kernel 129 g.view_copy.func, symint=metadata.supports_symint() [all …]
|
H A D | model.py | 1654 corresponding "view_copy" operators. We do this by optionally 2655 # easily access the generated (optional) view_copy NativeFunction. 2670 view_copy: NativeFunction | None 2676 if self.view_copy is None: 2681 " See Note [view_copy NativeFunctions] for details." 2684 assert self.view_copy.func.name.name.base.endswith(("_copy", "_scatter")) 2685 assert self.view.func.signature() == self.view_copy.func.signature( 2688 assert "view_copy" in self.view_copy.tags, ( 2689 …f"{str(self.view_copy.func.name), str(self.view.tags)} appears to be a view_copy operator. The cod… 2690 … " view_copy operators to be annotated with the 'view_copy' tag in native_functions.yaml." [all …]
|
/aosp_15_r20/external/executorch/backends/transforms/ |
H A D | addmm_mm_to_linear.py | 41 # if any of the nodes, during backtracking, is not view_copy 52 and node_to_backtrack.target == ops.aten.view_copy.default 62 Replaces pattern: x -> view_copy -> view_copy -> linear -> view_copy -> y 83 maybe_view_copy.target == ops.aten.view_copy.default 106 Furthermore it also removes various view_copy nodes. These nodes have been absorbed 108 Furthermore, removing view_copy nodes has the advantage of not having to match
|
H A D | fuse_view_copy.py | 16 Find chains of view_copy nodes and merge them into one view_copy node. 17 Only merges view_copy nodes that are not used by any other nodes. 20 view_op = ops.aten.view_copy.default 23 # find ending view_copy node in chain
|
H A D | view_copy_to_squeeze_unsqueeze.py | 19 Replaces view_copy nodes with squeeze_copy.dims nodes if the view node reduces dims of size 1. 20 … Replaces view_copy nodes with unsqueeze_copy.default nodes if the view node adds a dim of size 1. 25 self.view_copy_op: torch._ops.OpOverload = exir_ops.edge.aten.view_copy.default
|
/aosp_15_r20/external/executorch/backends/cadence/aot/ |
H A D | replace_ops.py | 196 view_copy op 224 exir_ops.edge.aten.view_copy.default, view_args, kwargs, meta 265 exir_ops.edge.aten.view_copy.default, view_args, kwargs, meta 519 exir_ops.edge.aten.view_copy.default, 1033 # graph operation (in this case a view_copy op) to be an explicit ProxyValue 1037 exir_ops.edge.aten.view_copy.default, 1055 exir_ops.edge.aten.view_copy.default, 1109 exir_ops.edge.aten.view_copy.default, 1356 # graph operation (in this case a view_copy op) to be an explicit ProxyValue 1360 exir_ops.edge.aten.view_copy.default, [all …]
|
H A D | fuse_ops.py | 44 return node.target == exir_ops.edge.aten.view_copy.default 161 # Any uses of addmm are replaced with this view_copy node. 163 # Now we massage the args of the view_copy node, so that it takes 523 if node.target != exir_ops.edge.aten.view_copy.default: 528 [node], [exir_ops.edge.aten.view_copy.default] 537 exir_ops.edge.aten.view_copy.default, 675 exir_ops.edge.aten.view_copy.default, 815 else {exir_ops.edge.aten.view_copy.default} 960 exir_ops.edge.aten.view_copy.default, 987 exir_ops.edge.aten.view_copy.default,
|
H A D | reorder_ops.py | 31 torch.ops.aten.view_copy, 46 exir_ops.edge.aten.view_copy, 635 mean the view_copy is normalized from squeeze or unsqueeze. 705 # Transform only for pattern permute_copy->view_copy, and 706 # view_copy op is the only user of permute_copy. 708 exir_ops.edge.aten.view_copy.default,
|
/aosp_15_r20/external/executorch/backends/cadence/aot/tests/ |
H A D | test_reorder_ops_passes.py | 284 self.assertTrue(nodes[0] == exir_ops.edge.aten.view_copy) 285 self.assertTrue(nodes[1] == exir_ops.edge.aten.view_copy) 317 self.assertTrue(nodes[0] == exir_ops.edge.aten.view_copy) 318 self.assertTrue(nodes[1] == exir_ops.edge.aten.view_copy) 352 self.assertTrue(nodes[0] == exir_ops.edge.aten.view_copy) 354 self.assertTrue(nodes[2] == exir_ops.edge.aten.view_copy)
|
H A D | test_replace_ops_passes.py | 773 # First, replace the aten.squeeze_copy with an aten.view_copy op 781 count_node(graph_after_passes, exir_ops.edge.aten.view_copy.default), 813 # First, replace the aten.unsqueeze_copy with an aten.view_copy op 821 count_node(graph_after_passes, exir_ops.edge.aten.view_copy.default), 1062 count_node(graph_after_passes, exir_ops.edge.aten.view_copy.default), 1 1097 count_node(graph_after_passes, exir_ops.edge.aten.view_copy.default), 1 1124 count_node(graph_after_passes, exir_ops.edge.aten.view_copy.default), 1 1225 self.assertEqual(count_node(gm, exir_ops.edge.aten.view_copy.default), 0) 1235 count_node(gm_after_replacement, exir_ops.edge.aten.view_copy.default), 0 1251 self.assertEqual(count_node(gm, exir_ops.edge.aten.view_copy.default), 0) [all …]
|
/aosp_15_r20/external/pytorch/test/quantization/pt2e/ |
H A D | test_duplicate_dq.py | 155 -----> view_copy --> linear 159 first conv2d is fed to next conv2d, add, and view_copy + linear. 191 -----> view_copy --> linear 195 first conv2d is fed to next conv2d, and view_copy + linear.
|
/aosp_15_r20/external/executorch/exir/verification/ |
H A D | verifier.py | 118 if torch.Tag.core not in op.tags and torch.Tag.view_copy not in op.tags: 119 … # NOTE(qihan): whether view_copy operators are marked as canonical is still under 282 if torch.Tag.core not in op.tags and torch.Tag.view_copy not in op.tags: 283 … # NOTE(qihan): whether view_copy operators are marked as canonical is still under
|
/aosp_15_r20/external/executorch/exir/tests/ |
H A D | test_remove_view_copy.py | 123 …# 11 call_function aten_view_copy_default_3 aten.view_copy.out (aten_mul_tens… 194 self.assertEqual(plan.operators[2].name, "aten::view_copy") 216 ) # aten:view_copy @ idx11 219 ) # aten:view_copy @ idx11
|
H A D | test_passes.py | 1559 x = torch.ops.aten.view_copy.default(x, [30, 1]) 1560 x = torch.ops.aten.view_copy.default(x, [5, 6]) 1561 x = torch.ops.aten.view_copy.default(x, [2, 15]) 1562 x = torch.ops.aten.view_copy.default(x, [3, -1]) 1568 and node.target == torch.ops.aten.view_copy.default 1611 and node.target == torch.ops.aten.view_copy.default 1624 o1 = torch.ops.aten.view_copy.default(x, [1]) 1625 o2 = torch.ops.aten.view_copy.default(self.parameter, [1]) 1644 "torch.ops.aten.view_copy.default", 2, exactly=True 1658 "torch.ops.aten.view_copy.default", 0, exactly=True
|
/aosp_15_r20/external/pytorch/torch/_export/passes/ |
H A D | replace_view_ops_with_view_copy_ops_pass.py | 13 torch.ops.aten._unsafe_view.default: torch.ops.aten.view_copy.default, 34 raise InternalError(f"{schema.name} is missing a view_copy variant") 39 raise InternalError(f"{schema.name} is missing a view_copy variant")
|
/aosp_15_r20/external/pytorch/torch/_functorch/ |
H A D | eager_transforms.py | 1601 view_copy = torch.ops.aten.view_copy(add, [-1]); add = None 1602 add_1 = torch.ops.aten.add(view_copy, 1); view_copy = None 1603 view_copy_1 = torch.ops.aten.view_copy(add_1, [2]); add_1 = None 1623 view_copy = torch.ops.aten.view_copy(a_1, [-1]) 1624 add = torch.ops.aten.add(view_copy, 1); view_copy = None 1625 view_copy_1 = torch.ops.aten.view_copy(add, [2]); add = None 1654 (e.g. ``tensor.view({-1})`` -> ``at::view_copy(tensor, {-1})``),
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/ |
H A D | ts_native_functions.yaml | 164 - view_copy 165 - view_copy.dtype 210 - view_copy
|
/aosp_15_r20/external/executorch/backends/arm/_passes/ |
H A D | decompose_linear_pass.py | 55 op_target=exir_ops.edge.aten.view_copy.default, 67 op_target=exir_ops.edge.aten.view_copy.default, 104 op_target=exir_ops.edge.aten.view_copy.default,
|
/aosp_15_r20/external/pytorch/test/expect/ |
H A D | HasDecompTest.test_aten_core_operators.expect | 524 aten::view_copy 525 aten::view_copy.dtype 526 aten::view_copy.dtype_out 527 aten::view_copy.out
|
/aosp_15_r20/external/pytorch/torchgen/dest/ |
H A D | lazy_ir.py | 507 # This is the case for all view and view_copy operators however, so we're going to 508 …# use them specifically for all of the view_copy ops (instead of manually writing shape rules for … 509 is_view_copy_op = "view_copy" in func.tags 535 # view_copy ops always have a CompositeExplicitAutogradNonFunctional kernel 680 is_view_copy_op = "view_copy" in f.tags
|