cuda.tile.cdiv#

cuda.tile.cdiv(x, y, /)#

Computes ceil(x / y). Can be used on the host.

Parameters:
  • x (Tile) – int tile.

  • y (Tile) – int tile.

Return type:

Tile

Examples

print(ct.cdiv(9, 4))
print(ct.cdiv(8, 4))
import cuda.tile as ct
import torch

torch.cuda.init()
stream = torch.cuda.current_stream()

print(ct.cdiv(9, 4))
print(ct.cdiv(8, 4))

torch.cuda.synchronize()

Output

3
2