def METHOD_NAME(comp_type, outer, inner, dtype):
    """Generate compute function."""
    if comp_type == "single_input":
        @T.prim_func
        def a_plus_1_primfunc(
            a_buffer: T.Buffer((outer, inner), dtype), out: T.Buffer((outer, inner), dtype)
        ):
            for i in T.serial(outer):
                for j in T.serial(inner):
                    with T.block("compute"):
                        with T.block():
                            out[i, j] = a_buffer[i, j] + T.cast(1, dtype)
        return a_plus_1_primfunc
    else:
        @T.prim_func
        def a_plus_b_plus_1_primfunc(
            a_buffer: T.Buffer((outer, inner), dtype),
            b_buffer: T.Buffer((outer, inner), dtype),
            out: T.Buffer((outer, inner), dtype),
        ):
            for i in T.serial(outer):
                for j in T.serial(inner):
                    with T.block("compute"):
                        with T.block():
                            out[i, j] = a_buffer[i, j] + b_buffer[i, j] + T.cast(1, dtype)
        return a_plus_b_plus_1_primfunc