Log Tiling

功能说明

Host侧接口,用于获取Log接口能完成计算所需最小的临时空间大小,此空间为预留空间,即需要保证预留有足够的物理空间,用于执行计算。

函数原型

inline uint32_t GetLogMinTmpSize(const ge::Shape srcShape, const uint32_t typeSize, const bool isReuseSource);

inline uint32_t GetLog10MinTmpSize(const ge::Shape srcShape, const uint32_t typeSize, const bool isReuseSource);

inline uint32_t GetLog2MinTmpSize(const ge::Shape srcShape, const uint32_t typeSize, const bool isReuseSource);

参数说明

表1 接口参数列表

接口

输入/输出

功能

srcShape

输入

输入的shape信息。

typeSize

输入

算子输入的数据类型大小,单位为字节。比如算子输入的数据类型为half,此处应传入2,即sizeof(half)。

isReuseSource

输入

是否允许修改源操作数。

返回值

GetLogMinTmpSize返回Log接口完成计算所需最小临时空间大小。

GetLog10MinTmpSize返回Log10接口完成计算所需最小临时空间大小。

GetLog2MinTmpSize返回Log2接口完成计算所需最小临时空间大小。

支持的型号

Atlas A2训练系列产品

调用示例

完整的调用样例请参考更多样例