文档首页>
Atlas 200 DK 开发者套件(1.0.7.alpha)>
TBE自定义算子开发指南>
接口参考>
矢量计算>
双目(Gather模式)>
TIK API>
算子代码实现接口>
vec_max
更新时间:2021-03-18 GMT+08:00
vec_max
功能说明
按element求最大值:
函数原型
vec_max(mask, dst, src0, src1, repeat_times, dst_rep_stride, src0_rep_stride, src1_rep_stride)
参数说明
请参见参数说明。
dst/src0/src1的数据类型需要保持一致。
昇腾310 AI处理器,dst/src0/src1支持的数据类型为:Tensor(float16,float32,int32)
返回值
无
注意事项
请参考注意事项。
调用示例
from te import tik tik_instance = tik.Tik() src0_ub = tik_instance.Tensor("float32", (64,), name="src0_ub", scope=tik.scope_ubuf) src1_ub = tik_instance.Tensor("float32", (64,), name="src1_ub", scope=tik.scope_ubuf) dst_ub = tik_instance.Tensor("float32", (64,), name="dst_ub", scope=tik.scope_ubuf) tik_instance.vec_max(64, dst_ub, src0_ub, src1_ub, 1, 8, 8, 8)
父主题: 双目(Gather模式)
