cuda.tile.tanh#

cuda.tile.tanh(x, /, *, rounding_mode=None)#

Perform tanh on a tile.

Parameters:
  • x (Tile)

  • rounding_mode (RoundingMode) –

    Supported values:

    • RoundingMode.FULL

    • RoundingMode.APPROX (since CTK 13.2)

Return type:

Tile

Examples

>>> tx = ct.full((32, 32), 3.0, dtype=ct.float32)
>>> tx = ct.tanh(tx)
>>> tx = ct.tanh(tx, rounding_mode=RoundingMode.APPROX)  # Faster approximation