vmaxs
函数功能
vmaxs指令抽象。
对向量中的每个元素和标量进行比较,返回较大者。
函数原型
class Vmaxs(x, y, z)
参数说明
参数名  | 
输入/输出  | 
数据类型  | 
说明  | 
|---|---|---|---|
x  | 
输入  | 
tensor变量  | 
输入x向量tensor。支持float16、float32、int16、 int32。  | 
y  | 
输入  | 
tensor变量  | 
输入标量。程序不对该参数做任何处理。  | 
z  | 
输出  | 
tensor变量  | 
输出向量tensor。支持float16、float32、int16、int32。  | 
使用示例
ub_x, ub_z = Tensor("UB"), Tensor("UB")
ub_x.load(gm_x)
out = vmaxs(ub_x, 5, ub_z)()
父主题: mskpp对外接口使用说明