GetInputConstData

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File/Library File

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

Function Usage

Obtains the value of an input Const node.

If the input of the operator is a Const node, the value of the Const node is returned. Otherwise, a failure message is returned. It supports checking whether the input is a Const node and retrieving its value 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.

Restrictions

None