SetWeightType
Function
Sets the position, data format, and data type of the weight matrix. These settings must be consistent with those in the kernel.
Prototype
1 | void SetWeightType(ConvCommonApi::TPosition pos, ConvCommonApi::ConvFormat format, ConvCommonApi::ConvDtype dtype) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pos |
Input |
Position of the weight in the memory. For details, see Position. Currently, only TPosition::GM is supported. |
format |
Input |
Data format of the weight. Currently, only ConvFormat::FRACTAL_Z_3D is supported. |
dtype |
Input |
Data type of the weight. Currently, only ConvDtype::FLOAT16 or ConvDtype::BF16 is supported. |
Returns
None
Restrictions
None
Example
1 2 3 4 5 | auto ascendcPlatform = platform_ascendc::PlatformAscendCManager::GetInstance(); ConvBackpropApi::Conv3DBpInputTiling conv3DBpDxTiling(*ascendcPlatform); conv3DBpDxTiling.SetWeightType(ConvCommonApi::TPosition::GM, ConvCommonApi::ConvFormat::FRACTAL_Z_3D, ConvCommonApi::ConvDtype::FLOAT16); |
Parent topic: Conv3DBackpropInput Tiling API