FilesLast commitLast update
7 days ago
18 days ago
7 days ago
7 days ago
7 days ago
1 month ago
7 days ago
5 days ago
README

TensorRedirect

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

  • Operator function: passes the values of the input tensor x to the output tensor output_x. The output has the same data type and shape as the input. This operator is used in graph optimization or reference redirection scenarios, and performs no type conversion, broadcasting, or data layout transformation.

  • Computation formula:

(output_x)i=xi(\mathrm{output\_x})_i=x_i

where ii traverses all elements of xx.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input tensor whose values need to be passed. FLOAT, FLOAT16, BFLOAT16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64 ND
output_x Output Tensor for the pass-through result. The data type, shape, and data format are all the same as those of x. FLOAT, FLOAT16, BFLOAT16, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64 ND

Constraint Description

  • No in-place invocation API is provided.
  • Ascend 950PR&950DT products:
    • All data types listed in the Parameter Description are supported.
    • Both static shape and dynamic shape support input ND→output ND. Dynamic shape supports fixed rank and dynamic rank.
    • The value range of rank is [0,8]. A rank of 0 indicates a scalar. Empty tensors are supported.
    • In a graph inference shape, -1 indicates an unknown dimension, and {-2} indicates an unknown rank. During actual execution, each dimension of the input tensor must be a specific non-negative integer.
  • Atlas A3 products, Atlas A2 products, Atlas 200I/500 A2 inference products, Atlas inference products, Atlas training products:
    • BFLOAT16 is not supported, and the other data types are the same as those in the Parameter Description.
    • Static shape supports input ND→output ND. Dynamic shape is not supported.
    • The value range of rank is [1,8]. Empty tensors are not supported.

Invocation Description

Invocation Method Invocation Sample Description
GE graph mode test_geir_tensor_redirect Invokes the TensorRedirect operator by building a graph through the operator IR.

This operator does not provide an ACLNN API with the same name, and supports only the GE graph-mode invocation in the preceding table.