cuda.tile.cdiv#
- cuda.tile.cdiv(x, y, /)#
Computes ceil(x / y). Can be used on the host.
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