cuda.tile.full#
- cuda.tile.full(shape, fill_value, dtype)#
Creates a tile filled with given value.
- Parameters:
- Return type:
Examples
tile = ct.full((2, 2), 3, dtype=ct.int32) print(tile)
import cuda.tile as ct import torch @ct.kernel def kernel(): tile = ct.full((2, 2), 3, dtype=ct.int32) print(tile) torch.cuda.init() ct.launch(torch.cuda.current_stream(), (1,), kernel, ()) torch.cuda.synchronize()
Output
[[3, 3], [3, 3]]