Skip to content

Commit 0ff1dd7

Browse files
Arm backend: Add docstrings for operator_support/clone_dim_order_support (#15869)
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai Signed-off-by: Sebastian Larsson <[email protected]>
1 parent 2f9e574 commit 0ff1dd7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

backends/arm/operator_support/clone_dim_order_support.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
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 dim-order clone in TOSA.
6+
7+
This module registers a support check for ``dim_order_ops._clone_dim_order``
8+
ensuring input/output dtypes match and the value types are FakeTensors.
9+
10+
"""
511

612
import logging
713

@@ -19,6 +25,8 @@
1925

2026
@register_tosa_support_check
2127
class CloneSupported(SupportedTOSAOperatorCheck):
28+
"""Provide TOSA support check for ``_clone_dim_order``."""
29+
2230
targets = [exir_ops.edge.dim_order_ops._clone_dim_order.default]
2331

2432
tosa_specs = [
@@ -29,6 +37,12 @@ class CloneSupported(SupportedTOSAOperatorCheck):
2937
def is_node_tosa_supported(
3038
self, node: fx.Node, tosa_spec: TosaSpecification
3139
) -> bool:
40+
"""Return True if the node is supported by TOSA.
41+
42+
Verify the operator target, the number and types of inputs/outputs, and
43+
check that input and output dtypes match.
44+
45+
"""
3246
if node.target not in self.targets:
3347
self.reporter.report_reject(node, f"Target {node.target} is not supported.")
3448
return False

0 commit comments

Comments
 (0)