tvm_tirx::ir::prim::op

Function abs

Source
pub fn abs(x: impl IntoExpr) -> Result<Expr>
Expand description

The absolute value of x: select(x >= 0, x, -x) for a signed integer, a call of prim.fabs for a float, and an unsigned integer itself; a constant folds (C++ abs, prim.abs).