SoftMax/SimpleSoftMax Tiling
Function Description
Obtains SoftMax/SimpleSoftMax tiling parameters.
Prototype
1 | uint32_t GetSoftMaxMaxTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isReuseSource) |
1 | uint32_t GetSoftMaxMinTmpSize(const ge::Shape& srcShape, const uint32_t dataTypeSize, const bool isReuseSource) |
1 | void SoftMaxTilingFunc(const ge::Shape srcShape&, const uint32_t dataTypeSize, const uint32_t localWorkSpaceSize, optiling::SoftMaxTiling& softmaxTiling) |
Parameters
API |
Input/Output |
Function |
|---|---|---|
srcShape |
Input |
Input shape of srcTensor. |
dataTypeSize |
Input |
Data type size of max and sum involved in computation, for example, half = 2. |
isReuseSource |
Input |
The value must be the same as the API configuration in the kernel. |
API |
Input/Output |
Function |
|---|---|---|
srcShape |
Input |
Input shape of srcTensor. |
localWorkSpaceSize |
Input |
Size of the remaining space that can be used for SoftMax computation. The unit is byte. |
dataTypeSize |
Input |
Data type size of max and sum involved in computation, for example, half = 2. |
softmaxTiling |
Output |
Tiling information required by SoftMax. |
Returns
GetSoftMaxMaxTmpSize returns the maximum size (in byte) of the temporary space required for SoftMax/SimpleSoftMax computation.
GetSoftMaxMinTmpSize returns the minimum size (in byte) of the temporary space required for SoftMax/SimpleSoftMax computation.