cuda.tile.exp#
- cuda.tile.exp(x, /, *, rounding_mode=None)#
Perform exp on a tile.
- Parameters:
x (Tile)
rounding_mode (RoundingMode) –
Supported values:
RoundingMode.FULL(f32 only)RoundingMode.APPROX(f32 only)
(since CTK 13.3)
- Return type:
Examples
tx = ct.full((4,), 0.0, dtype=ct.float32) print(f"{ct.exp(tx):.1f}")
import cuda.tile as ct import torch @ct.kernel def kernel(): tx = ct.full((4,), 0.0, dtype=ct.float32) print(f"{ct.exp(tx):.1f}") torch.cuda.init() ct.launch(torch.cuda.current_stream(), (1,), kernel, ()) torch.cuda.synchronize()
Output
[1.0, 1.0, 1.0, 1.0]