SoftmaxFlash Tiling接口

功能说明

用于获取SoftmaxFlash Tiling参数。

函数原型

inline uint32_t GetSoftMaxFlashMaxTmpSize(const ge::Shape srcShape, const uint32_t typeSize, bool isUpdate,

const bool isReuseSource)

inline void TikcSoftMaxFlashTilingFunc(const ge::Shape srcShape, const uint32_t typeSize,

const uint32_t workLocalSize, optiling::SoftMaxTiling& softmaxTiling, bool isUpdate = false)

参数说明

表1 SoftmaxFlash GetSoftMaxFlashMaxTmpSize接口参数列表

接口

输入/输出

功能

srcShape

输入

输入的shape信息

typeSize

输入

计算的数据类型,比如half=2

isUpdate

输入

是否使能刷新功能,和kernel侧softmaxflash接口一致,默认false

isReuseSource

输入

是否复用src输入的空间,与kernel侧接口一致

表2 SoftmaxFlash TikcSoftMaxFlashTilingFunc接口参数列表

接口

输入/输出

功能

srcShape

输入

输入的shape信息

workLocalSize

输入

剩余的可供softmax接口计算的空间大小

typeSize

输入

计算的数据类型,比如half=2

isUpdate

输入

是否使能刷新功能,和kernel侧softmaxflash接口一致,默认false

softmaxTiling

输出

输出softmax接口所需的tiling信息

返回值

GetSoftMaxFlashMaxTmpSize返回softmaxflash接口能完成计算所需最小临时空间大小。