vrsqrt
Description
Computes the reciprocal of the square root for a tensor element-wise.
Prototype
vrsqrt(raw_tensor, impl_mode="high_performance")
Parameters
- raw_tensor: a tvm.tensor for the input tensor
Atlas 200/300/500 Inference Product : supports float16 and float32.Atlas Training Series Product : supports float16 and float32. - impl_mode: specifies if precision takes priority over performance.
- high_precision: Precision takes priority. In this case, performance is compromised due to the complex compute process.
- high_performance: Performance takes priority. In this case, the precision decreases.
Defaults to high_performance.
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 = "float 16" data = tvm.placeholder(shape, name="data", dtype=input_dtype) res = dsl.vrsqrt(data)
Parent topic: Math Compute APIs