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