Conv3D Template Parameters
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
The following parameters need to be passed to create a Conv3D object:
- Types of Input, Weight, Output, and Bias (optional) are defined by ConvType, including the logical memory location, data format, and data type.
- Conv3dParam information (optional), which is used to enable the performance optimization template in different scenarios. Currently, this is not supported.
Prototype
1 2 | template <class INPUT_TYPE, class WEIGHT_TYPE, class OUTPUT_TYPE, class BIAS_TYPE = biasType, class CONV_CFG = Conv3dParam> using Conv3D = Conv3dIntfExt<Config<ConvApi::ConvDataType<INPUT_TYPE, WEIGHT_TYPE, OUTPUT_TYPE, BIAS_TYPE, CONV_CFG>>, Impl, Intf> |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
INPUT_TYPE |
Input |
ConvType type template parameter, specifying the type of the Input parameter. |
WEIGHT_TYPE |
Input |
ConvType type template parameter, specifying the type of the Weight parameter. |
OUTPUT_TYPE |
Input |
ConvType type template parameter, specifying the type of the Output parameter. |
BIAS_TYPE |
Optional input |
ConvType type template parameter, specifying the type of the Bias parameter. |
CONV_CFG |
Optional input |
ConvParam type template parameter, which is used to enable the performance optimization template for different scenarios. In the current version, only the basic template is supported, and performance optimization is not enabled. |
Returns
None
Restrictions
None
Example
1 2 3 4 5 6 7 8 9 10 11 | #include "lib/conv/conv3d/conv3d_api.h" using inputType = ConvApi::ConvType<AscendC::TPosition::GM, ConvFormat::NDC1HWC0, bfloat16_t>; using weightType = ConvApi::ConvType<AscendC::TPosition::GM, ConvFormat::FRACTAL_Z_3D, bfloat16_t>; using outputType = ConvApi::ConvType<AscendC::TPosition::GM, ConvFormat::NDC1HWC0, bfloat16_t>; using biasType = ConvApi::ConvType<AscendC::TPosition::GM, ConvFormat::ND, float>; // The parameter is optional. If Bias is not used, the parameter does not need to be transferred. struct ConvCustom : public ConvApi::ConvParam { __aicore__ inline ConvCustom(){}; }; // The parameter is optional. In the current version, only the basic template is supported, and performance optimization is not enabled. The parameter does not need to be transferred. Conv3dApi::Conv3D<inputType, weightType, outputType, biasType, ConvCustom> conv3dApi; |