OutputTensorDesc

Function Usage

Sets the description of the operator output Tensor. It is used to construct information (like ComputeNodeInfo) in the base class ExtendedKernelContext of InferShapeContext.

Prototype

1
OpInferShapeContextBuilder &OutputTensorDesc(size_t index, ge::DataType dtype, ge::Format origin_format, ge::Format storage_format, const gert::ExpandDimsType &expand_dims_type = {})

Parameters

Parameter

Input/Output

Description

index

Input

Index of the output, corresponding to the index of the operator output instance.

dtype

Input

Data type of the output Tensor.

origin_format

Input

Original format of the output Tensor.

storage_format

Input

Storage format of the output Tensor.

expand_dims_type

Input

ExpandDimsType of a dimension expansion rule for the output Tensor.

Returns

A reference to the OpInferShapeContextBuilder object. It is used for chaining method calls.

Constraints

This API must be called before the Build method call. Otherwise, the constructed InferShapeContext will contain undefined data.