vmins
Description
Compares a raw_tensor with a scalar element-wise and returns the min elements.
Prototype
vmins(raw_tensor, scalar)
Parameters
- raw_tensor: a tvm.tensor for the input tensor
- scalar: a scalar for the coefficient to be compared with raw_tensor element-wise
- In case of data type inconsistency, the scalar will be converted into the same data type as the raw_tensor during computation.
Atlas 200/300/500 Inference Product : supports float16, float32, and int32.Atlas Training Series Product : supports float16, float32, and int32.
Returns
res_tensor: a tvm.tensor for the result tensor
Restrictions
None
Applicability
Example
from tbe import tvm from tbe import dsl shape = (1024,1024) input_dtype = "float16" data = tvm.placeholder(shape, name="data", dtype=input_dtype) scalar = tvm.const(2, dtype =input_dtype) res = dsl.vmins(data, scalar)
Parent topic: Math Compute APIs