Conv3DBackpropFilter Tiling Constructor
Function
Creates a single-core Conv3DBackpropFilter tiling object.
Prototype
- Parameterized constructor, which requires the hardware platform information to be passed. You are advised to use this type of constructor to achieve better compatibility.
- Use PlatformAscendC to pass in information.
1explicit Conv3dBpFilterTiling(const platform_ascendc::PlatformAscendC& ascendcPlatform)
- Use PlatformInfo to pass in information.If platform_ascendc::PlatformAscendC fails to be obtained during tiling running, you need to construct the PlatformInfo structure and transparently transmit it to the Conv3dBpFilterTiling constructor.
1explicit Conv3dBpFilterTiling(const PlatformInfo& platform)
- Use PlatformAscendC to pass in information.
- Constructor without parameters
1Conv3dBpFilterTiling()
- Base class constructor
Conv3dBpFilterTiling is inherited from the base class Conv3dBpFilterTilingBase. Its constructor is as follows:
1Conv3dBpFilterTilingBase()
1explicit Conv3dBpFilterTilingBase(const platform_ascendc::PlatformAscendC& ascendcPlatform)
1explicit Conv3dBpFilterTilingBase(const PlatformInfo& platform)
Parameters
Parameter |
Input/Output |
Description |
||
|---|---|---|---|---|
ascendcPlatform |
Input |
Hardware platform information that is passed. For details about the definition of PlatformAscendC, see Constructor and Destructor. |
||
platform |
Input |
Hardware version and memory size of each hardware unit in the AI Core. The value is obtained through Constructor and Destructor during PlatformInfo construction. The PlatformInfo structure is defined as follows. socVersion is obtained and transparently transmitted through GetSocVersion. The storage space size of each hardware is obtained and transparently transmitted through GetCoreMemSize.
You are advised not to invoke the constructor by directly filling a value to construct PlatformInfo, for example, PlatformInfo(, 1024, 1024, ...). |
platform_ascendc::PlatformAscendC is used to obtain hardware platform information, such as the number of cores on a hardware platform for tiling computation to implement the tiling function on the host. The PlatformAscendC class provides a function for obtaining such platform information.
Different from platform_ascendc::PlatformAscendC, PlatformInfo is used to obtain information specific to a single AI Core, such as the chip version and the memory size provided by each hardware unit in the AI Core.
Restrictions
None
Example
- Constructor without parameters
1 2 3 4 5 6
Convolution3DBackprop::Conv3dBpFilterTiling tiling; tiling.SetWeightType(ConvCommonApi::TPosition::GM,ConvCommonApi::ConvFormat::FRACTAL_Z_3D,ConvCommonApi::ConvDtype::FLOAT32); ... optiling::Conv3DBackpropFilterTilingData tilingData; int ret = tiling.GetTiling(tilingData); // if ret = -1, gen tiling failed ...
- Parameterized constructor
1 2 3 4 5 6
auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); ConvBackpropApi::Conv3dBpFilterTiling tiling(ascendcPlatform); tiling.SetWeightType(ConvCommonApi::TPosition::GM,Convolution3DBackprop::ConvFormat::FRACTAL_Z_3D,ConvCommonApi::ConvDtype::FLOAT32); ... optiling::Conv3DBackpropFilterTilingData tilingData; int ret = tiling.GetTiling(tilingData); // if ret = -1, gen tiling failed