@triton.jit
def triton_fill_kernel(input_ptr, value: tl.constexpr, numel: tl.constexpr,
    dtype: tl.constexpr, block_size: tl.constexpr):
    block_start = tl.program_id(axis=0).to(tl.int64) * block_size
    offsets = block_start + tl.arange(0, block_size)
    mask = offsets < numel
    tl.store(input_ptr + offsets, tl.full((block_size,), value, dtype),
        mask=mask)
