check_node_support_on_aicore

Applicable Products

All processors

Function Usage

Verifies the input node to check whether it can be executed on the AI Core.

Prototype

1
check_node_support_on_aicore(node: Node) -> Tuple[bool, str]

Parameters

Parameter

Input/Output

Description

node

Input

Node to be checked. The type is Node.

Returns

  • (Tuple[bool, str]) the (is_supported, unsupported_reason) tuple
  • is_supported: True indicates that the node can be executed on the AI Core; False indicates that the node cannot be executed on the AI Core.
  • unsupported_reason indicates the reason why the function is not supported.

Restrictions

  • If the check fails, RuntimeError is thrown.
  • Before calling this API, ensure that the shape of the node has been inferred. This is because the verification process requires the shape information.