vmaxs
Function
vmaxs instruction abstraction.
Compares each element in the vector with a scalar and returns the larger one.
Prototype
1 | class vmaxs(x, y, z) |
Parameters
Parameter |
Input/Output |
Data Type |
Description |
|---|---|---|---|
x |
Input |
Tensor variable |
Input x-vector tensor. float16, float32, int16, and int32 are supported. |
y |
Input |
Tensor variable |
Input scalar. The program does not process this parameter. |
z |
Output |
Tensor variable |
Output vector tensor. float16, float32, int16, and int32 are supported. |
Example
1 2 3 4 5 | from mskpp import vmaxs, Tensor ub_x, ub_z = Tensor("UB"), Tensor("UB") gm_x = Tensor("GM") ub_x.load(gm_x) out = vmaxs(ub_x, 5, ub_z)() |
Parent topic: Description of msKPP External APIs