FilesLast commitLast update
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
28 days ago
15 days ago
README

Const

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

Creates a constant tensor from a tensor-like object for inference scenarios. The Const operator is defined in the same way as the Constant operator. It infers the shape and data type of the output tensor y based on the Tensor value and type stored in the value attribute. The output shape and data type are consistent with the Tensor in the value attribute.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
value Attribute Required. Value and type of the output tensor. The type is unlimited. Tensor, with the default value Tensor() -
y Output Constant tensor, whose shape and data type are consistent with those of the value attribute. TensorType::ALL() ND

Constraint Description

None

Invocation Description

The Const operator is a basic operator of the graph engine. It is usually used as a constant node in a graph and is not invoked separately.

Invocation Method Invocation Sample Description
Graph-mode invocation test_geir_const Invokes the Const operator by building a graph through the operator IR