FilesLast commitLast update
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
25 days ago
12 days ago
README

GuaranteeConst

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

Guarantees to the runtime that the input tensor is a constant. This operator is a pass-through operator: the output tensor y is the input tensor x, without changing any shape, data type, or value. It only passes the semantic information that "the input is a constant" in the graph for graph optimization decisions. The shape and data type of the output tensor y are consistent with those of the input tensor x.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Tensor that needs to be guaranteed as a constant. TensorType::ALL() ND
y Output Output tensor, which is exactly the same as the input x (shape, data type, and value). TensorType::ALL() ND

Constraint Description

  • This operator is an experimental feature (EXPERIMENTAL) and must not be used in production environments.
  • This operator is a TensorFlow-compatible pass-through operator. It is eliminated in the graph optimization phase (the output is directly connected to the input) and does not generate actual computation tasks at runtime.

Invocation Description

The GuaranteeConst operator is a basic operator of the graph engine. It is used to mark constant semantics in a graph and is not invoked separately.

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