Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions backends/arm/operator_support/clone_dim_order_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
"""Declare operator support for dim-order clone in TOSA.
This module registers a support check for ``dim_order_ops._clone_dim_order``
ensuring input/output dtypes match and the value types are FakeTensors.
"""

import logging

Expand All @@ -19,6 +25,8 @@

@register_tosa_support_check
class CloneSupported(SupportedTOSAOperatorCheck):
"""Provide TOSA support check for ``_clone_dim_order``."""

targets = [exir_ops.edge.dim_order_ops._clone_dim_order.default]

tosa_specs = [
Expand All @@ -29,6 +37,12 @@ class CloneSupported(SupportedTOSAOperatorCheck):
def is_node_tosa_supported(
self, node: fx.Node, tosa_spec: TosaSpecification
) -> bool:
"""Return True if the node is supported by TOSA.
Verify the operator target, the number and types of inputs/outputs, and
check that input and output dtypes match.
"""
if node.target not in self.targets:
self.reporter.report_reject(node, f"Target {node.target} is not supported.")
return False
Expand Down
Loading