tilelang.language.math_intrinsicsΒΆ
FunctionsΒΆ
|
IEEE-compliant addition with specified rounding mode |
|
IEEE-compliant subtraction with specified rounding mode |
|
IEEE-compliant multiplication with specified rounding mode |
|
IEEE-compliant fused multiply-add with specified rounding mode |
|
IEEE-compliant reciprocal with specified rounding mode |
|
IEEE-compliant square root with specified rounding mode |
|
IEEE-compliant reciprocal square root (round to nearest only) |
|
IEEE-compliant division with specified rounding mode |
Module ContentsΒΆ
- tilelang.language.math_intrinsics.ieee_add(x, y, rounding_mode='rn')ΒΆ
IEEE-compliant addition with specified rounding mode
- Parameters:
x (PrimExpr) β First operand.
y (PrimExpr) β Second operand.
rounding_mode (str, optional) β Rounding mode: βrnβ (round to nearest), βrzβ (round toward zero), βruβ (round toward positive infinity), βrdβ (round toward negative infinity). Default is βrnβ.
- Returns:
result β The result.
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_sub(x, y, rounding_mode='rn')ΒΆ
IEEE-compliant subtraction with specified rounding mode
- Parameters:
x (PrimExpr) β First operand.
y (PrimExpr) β Second operand.
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result.
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_mul(x, y, rounding_mode='rn')ΒΆ
IEEE-compliant multiplication with specified rounding mode
- Parameters:
x (PrimExpr) β First operand.
y (PrimExpr) β Second operand.
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result.
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_fmaf(x, y, z, rounding_mode='rn')ΒΆ
IEEE-compliant fused multiply-add with specified rounding mode
- Parameters:
x (PrimExpr) β First operand.
y (PrimExpr) β Second operand.
z (PrimExpr) β Third operand (addend).
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result of x * y + z.
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_frcp(x, rounding_mode='rn')ΒΆ
IEEE-compliant reciprocal with specified rounding mode
- Parameters:
x (PrimExpr) β Input operand.
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result of 1/x.
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_fsqrt(x, rounding_mode='rn')ΒΆ
IEEE-compliant square root with specified rounding mode
- Parameters:
x (PrimExpr) β Input operand.
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result of sqrt(x).
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_frsqrt(x)ΒΆ
IEEE-compliant reciprocal square root (round to nearest only)
- Parameters:
x (PrimExpr) β Input operand.
- Returns:
result β The result of 1/sqrt(x).
- Return type:
PrimExpr
- tilelang.language.math_intrinsics.ieee_fdiv(x, y, rounding_mode='rn')ΒΆ
IEEE-compliant division with specified rounding mode
- Parameters:
x (PrimExpr) β Dividend.
y (PrimExpr) β Divisor.
rounding_mode (str, optional) β Rounding mode: βrnβ, βrzβ, βruβ, βrdβ. Default is βrnβ.
- Returns:
result β The result of x/y.
- Return type:
PrimExpr