SoftmaxGrad Tiling

Function Description

Obtains the SoftmaxGrad tiling parameter.

Prototype

1
uint32_t GetSoftMaxGradMaxTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isFront, const bool isReuseSource)
1
uint32_t GetSoftMaxGradMinTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isFront, const bool isReuseSource)
1
void SoftMaxGradTilingFunc(const ge::Shape srcShape&, const uint32_t dataTypeSize, const uint32_t localWorkSpaceSize, optiling::SoftMaxTiling& softmaxGradTiling, const bool isFront = false)

Parameters

Table 1 SoftmaxGrad GetSoftMaxGradMaxTmpSize/GetSoftMaxGradMinTmpSize parameters

API

Input/Output

Function

srcShape

Input

Input shape of srcTensor.

dataTypeSize

Input

Data type for computation, for example, half = 2.

isFront

Input

Whether to compute only. The value is the same as that of SoftmaxGrad in the kernel. The default value is false.

isReuseSource

Input

The value must be the same as the API configuration in the kernel.

Table 2 SoftmaxGrad SoftMaxGradTilingFunc parameters

API

Input/Output

Function

srcShape

Input

Input shape of srcTensor.

localWorkSpaceSize

Input

Size of the remaining temporary space that can be used for SoftmaxGrad computation. The unit is byte.

dataTypeSize

Input

Data type for computation, for example, half = 2.

isFront

Input

Whether to compute only. The value is the same as that of SoftmaxGrad in the kernel. The default value is false.

softmaxGradTiling

Output

Tiling information required by SoftmaxGrad.

Returns

GetSoftMaxGradMinTmpSize returns the minimum size (in byte) of the temporary space required for SoftmaxGrad computation.

GetSoftMaxGradMaxTmpSize returns the maximum size (in byte) of the temporary space required for SoftmaxGrad computation.