File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
backends/arm/operator_support Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 22#
33# This source code is licensed under the BSD-style license found in the
44# LICENSE file in the root directory of this source tree.
5+ """Declare operator support for ``aten.sum.dim_IntList`` in TOSA.
56
7+ Provide shape constraints for U55 subsets; otherwise allow reductions.
8+
9+ """
610from typing import cast
711
812import torch .fx as fx
1620
1721@register_tosa_support_check
1822class SumSupported (SupportedTOSAOperatorCheck ):
23+ """Provide TOSA support check for sum over dimensions."""
24+
1925 targets = [exir_ops .edge .aten .sum .dim_IntList ]
2026
2127 tosa_specs = [
2228 TosaSpecification .create_from_string ("TOSA-1.0+INT" ),
2329 TosaSpecification .create_from_string ("TOSA-1.0+FP" ),
2430 ]
2531
26- def is_node_tosa_supported (self , node : fx .Node , tosa_spec : TosaSpecification ):
32+ def is_node_tosa_supported (
33+ self , node : fx .Node , tosa_spec : TosaSpecification
34+ ) -> bool :
35+ """Return True if the node is supported by TOSA.
36+
37+ On U55 subsets, enforce bounds on the reduced dimension and the products
38+ of sizes before/after the reduction axis. On other targets, accept the
39+ operation unconditionally.
40+
41+ """
2742 if not tosa_spec .is_U55_subset :
2843 return True
2944
You can’t perform that action at this time.
0 commit comments