Conv3DBackpropInput Tiling Constructor
Function
Creates a single-core Conv3DBackpropInput 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 Conv3DBpInputTiling(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 Conv3DBpInputTiling constructor.
1explicit Conv3DBpInputTiling(const PlatformInfo& platform)
- Use PlatformAscendC to pass in information.
- Constructor without parameters
1Conv3DBpInputTiling()
- Base class constructor
Conv3DBpInputTiling is inherited from the base class Conv3DBpInputTilingBase. Its constructor is as follows:
1Conv3DBpInputTilingBase()
1explicit Conv3DBpInputTilingBase(const platform_ascendc::PlatformAscendC& ascendcPlatform)
1explicit Conv3DBpInputTilingBase(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
ConvBackpropApi::Conv3DBpInputTiling tiling; tiling.SetWeightType(ConvCommonApi::TPosition::GM,ConvCommonApi::ConvFormat::FRACTAL_Z_3D,ConvCommonApi::ConvDtype::FLOAT16); ... optiling::Conv3DBackpropInputTilingData 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::Conv3DBpInputTiling tiling(ascendcPlatform); tiling.SetWeightType(ConvCommonApi::TPosition::GM,ConvCommonApi::ConvFormat::FRACTAL_Z_3D,ConvCommonApi::ConvDtype::FLOAT16); ... optiling::Conv3DBackpropInputTilingData tilingData; int ret = tiling.GetTiling(tilingData); // if ret = -1, gen tiling failed