FilesLast commitLast update
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
22 days ago
9 days ago
README

ConstPlaceHolder

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 placeholder tensor. This operator processes inputs whose addresses remain unchanged but whose values are uncertain. Converting an input to this type helps improve the graph execution performance (prevents input addresses from being repeatedly refreshed). The shape and data type of the output tensor y are inferred based on the origin_shape and dtype attributes. The output shape is consistent with the origin_shape attribute, and the output data type is consistent with the dtype attribute.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
origin_shape Attribute Required. Original shape of the tensor. ListInt -
origin_format Attribute Required. Original format of the tensor. Int -
storage_shape Attribute Required. Storage shape of the tensor. ListInt -
storage_format Attribute Required. Storage format of the tensor. Int -
expand_dim_rules Attribute Required. Dimension expansion rules for converting origin_shape, origin_format, and storage_format to storage_shape. String -
dtype Attribute Required. Data type of the tensor. Type -
addr Attribute Required. Address of the tensor. Int -
size Attribute Required. Size of the address. Int -
placement Attribute Placement position of the tensor. 0 indicates Host, and 1 indicates Device. Int, with the default value 1 -
y Output Constant placeholder tensor, whose shape is consistent with the origin_shape attribute and whose data type is consistent with the dtype attribute. TensorType::ALL() ND

Constraint Description

None

Invocation Description

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

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