@triton.jit
def _Stats_cl3d_impl(X_ptr, Mean_ptr, Sqmean_ptr, numel_no_channels,
    num_channels: tl.constexpr, block_other: tl.constexpr):
    pid = tl.program_id(0)
    X_ptr += pid * block_other * num_channels
    channels_offset = tl.arange(0, num_channels)
    other_offset = tl.arange(0, block_other)
    offset = other_offset[:, None] * num_channels + channels_offset[None, :]
    mask = other_offset[:, None] < numel_no_channels - pid * block_other
    x = tl.load(X_ptr + offset, mask=mask, other=0.0).to(tl.float32)
    mean = tl.sum(x, axis=0) / numel_no_channels
    sqmean = tl.sum(x * x, axis=0) / numel_no_channels
    tl.atomic_add(Mean_ptr + channels_offset, mean)
    tl.atomic_add(Sqmean_ptr + channels_offset, sqmean)
