SetOutputType
Function
Sets the position, data format, and data type of the result matrix Output in the memory.
Prototype
1 | void SetOutputType(const ConvCommonApi::TPosition pos, const ConvCommonApi::ConvFormat format, const ConvCommonApi::ConvDtype dtype) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pos |
Input |
Position of Output in the memory. Curently, only TPosition::CO1 is supported. |
format |
Input |
Output data format. Currently, only ConvFormat::NDC1HWC0 is supported. |
dtype |
Input |
Output data type. Currently, only ConvDtype::FLOAT16 and ConvDtype::BF16 are supported. |
Returns
None
Restrictions
This API is optional before calling the GetTiling API. If this API is not called, the default Bias is pos=TPosition::CO1, format=ConvFormat::NDC1HWC0 and dtype=ConvDtype::FLOAT16.
Example
1 2 3 4 | // Instantiate the Conv3D API. auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); Conv3dTilingApi::Conv3dTiling conv3dApiTiling(ascendcPlatform); conv3dApiTiling.SetOutputType(ConvCommonApi::TPosition::CO1, ConvCommonApi::ConvFormat::NDC1HWC0, ConvCommonApi::ConvDtype::BF16); |
Parent topic: Conv3D Tiling APIs