@staticmethod
@triton.jit
def forward(output_ptr, input_ptr, size, p, seed, block_size: tl.constexpr):
    pid = tl.program_id(0)
    offset = pid * block_size
    input_block_ptr = tl.make_block_ptr(input_ptr, shape=(size,), strides=(
        1,), offsets=(offset,), block_shape=(block_size,), order=(0,))
    output_block_ptr = tl.make_block_ptr(output_ptr, shape=(size,), strides
        =(1,), offsets=(offset,), block_shape=(block_size,), order=(0,))
    offsets = tl.arange(0, block_size) + offset
    random_values = tl.rand(seed, offsets)
    condition = random_values > p
    input = tl.load(input_block_ptr, boundary_check=(0,))
    output = tl.where(condition, input * (1 / (1 - p)), 0.0)
    tl.store(output_block_ptr, output, boundary_check=(0,))
