cuda.tile.bitwise_not#
- cuda.tile.bitwise_not(x, /)#
Elementwise bitwise not on a tile.
Can also use builtin operator ~x.
Examples
tx = ct.full((4,), 0, dtype=ct.int32) ty = ~tx print(ty)
import cuda.tile as ct import torch @ct.kernel def kernel(): tx = ct.full((4,), 0, dtype=ct.int32) ty = ~tx print(ty) torch.cuda.init() ct.launch(torch.cuda.current_stream(), (1,), kernel, ()) torch.cuda.synchronize()
Output
[-1, -1, -1, -1]