def METHOD_NAME(
    self, input_len: int, ctx: Optional[QuantizationContext] = None
) -> int:
    # Use the same logic in _float_to_fused8bitrowwise_gpu_t()
    if self._comm_precision == SparseType.INT8 or (
        self._comm_precision == SparseType.FP8 and self._row_dim > 0
    ):
        ctx = none_throws(ctx)
        assert (
            input_len % ctx.row_dim == 0
        ), f"input_len {input_len} is not a multiple of row dim {ctx.row_dim}"
        nrows = input_len // ctx.row_dim
        ncols = (ctx.row_dim + 3) // 4 * 4 + 2 * 4
        return nrows * ncols
    else:
        return input_len