SetGradOutputType

Function

Sets the position, data format, and data type of GradOutput. These settings must be consistent with those in the kernel.

Prototype

1
void SetGradOutputType(ConvCommonApi::TPosition pos, ConvCommonApi::ConvFormat format, ConvCommonApi::ConvDtype dtype)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

pos

Input

Position of GradOutput in the memory. For details, see Position. Currently, only TPosition::GM is supported.

format

Input

Data format of GradOutput. Currently, only ConvFormat::NDC1HWC0 is supported.

dtype

Input

Data type of GradOutput. Currently, only ConvDtype::FLOAT16 and ConvDtype::BF16 are supported.

Returns

None

Restrictions

None

Example

1
2
3
4
5
auto ascendcPlatform = platform_ascendc::PlatformAscendCManager::GetInstance();
ConvBackpropApi::Conv3DBpInputTiling conv3DBpDxTiling(*ascendcPlatform);
conv3DBpDxTiling.SetGradOutputType(ConvCommonApi::TPosition::GM,
                                   ConvCommonApi::ConvFormat::NDC1HWC0,
                                   ConvCommonApi::ConvDtype::FLOAT16);