SoftmaxGrad Tiling
Function
Obtains the tiling parameters required by SoftmaxGrad.
Prototype
- APIs for obtaining the minimum and maximum temporary space required for kernel computation
1uint32_t GetSoftMaxGradMaxTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isFront, const bool isReuseSource)
1uint32_t GetSoftMaxGradMinTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isFront, const bool isReuseSource)
- Tiling computation APIs
- Computation API in the AscendC::optiling namespace
1void SoftMaxGradTilingFunc(const ge::Shape& srcShape, const uint32_t dataTypeSize, const uint32_t localWorkSpaceSize, optiling::SoftMaxTiling& softmaxGradTiling, const bool isFront = false)
- Computation API in the AscendC namespace
1void SoftMaxGradTilingFunc(const ge::Shape& srcShape, const uint32_t dataTypeSize, const uint32_t localWorkSpaceSize, AscendC::tiling::SoftMaxTiling& softmaxGradTiling, const bool isFront = false)
- Computation API in the AscendC::optiling namespace
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
srcShape |
Input |
Shape of the input srcTensor. |
dataTypeSize |
Input |
Data type size for computation, for example, half = 2. |
isFront |
Input |
Whether to compute |
isReuseSource |
Input |
The value must be the same as the API configuration in the kernel. |
Parameter |
Input/Output |
Description |
|---|---|---|
srcShape |
Input |
Shape of the input srcTensor. |
localWorkSpaceSize |
Input |
Size of the remaining temporary space that can be used for SoftmaxGrad computation. The unit is byte. The value of localWorkSpaceSize must be greater than the minimum temporary space size required for computation by the GetSoftMaxGradMinTmpSize API. |
dataTypeSize |
Input |
Data type size for computation, for example, half = 2. |
isFront |
Input |
Whether to compute |
softmaxGradTiling |
Output |
Tiling information required by the SoftmaxGrad APIs. The input parameters in the optiling::SoftMaxTiling and AscendC::tiling::SoftMaxTiling formats are supported. |
Returns
GetSoftMaxGradMinTmpSize returns the minimum size (in bytes) of the temporary space required by SoftmaxGrad computation.
GetSoftMaxGradMaxTmpSize returns the maximum size (in bytes) of the temporary space required by SoftmaxGrad computation.
Restrictions
None

