GetInputConstData

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <graph/gnode.h>
  • Library file: libgraph.so

Function Usage

Obtains the value of the input Const node.

Returns the value of the const node if the operator input is a Const node. Otherwise, a failure message is returned. Determines whether the input is a Const node and the value of the Const node across subgraphs.

Prototype

1
graphStatus GetInputConstData(const int32_t index, Tensor &data) const

Parameters

Parameter

Input/Output

Description

index

Input

Input port index of the operator.

data

Output

Value of the input Const.

Returns

Parameter

Type

Description

-

graphStatus

GRAPH_SUCCESS: success. GRAPH_NODE_WITHOUT_CONST_INPUT: The input is not a Const. Other values: failure.

Constraints

None