def METHOD_NAME(data, indices, indptr, weight, out):
    """define ir for csrmm"""
    irb = tvm.tir.ir_builder.create()
    data_ptr = irb.buffer_ptr(data)
    indices_ptr = irb.buffer_ptr(indices)
    indptr_ptr = irb.buffer_ptr(indptr)
    weight_ptr = irb.buffer_ptr(weight)
    out_ptr = irb.buffer_ptr(out)
    M = simplify(indptr.shape[0] - 1)
    _, N = weight.shape
    with irb.for_range(0, N, kind="vectorize", name="n") as n:
        with irb.for_range(0, M, kind="parallel", name="row") as row:
            dot = irb.allocate(data.dtype, (1,), name="dot", scope="local")
            out_ptr[row * N + n] = cast(0, data.dtype)
            dot[0] = cast(0, data.dtype)
            row_start = indptr_ptr[row]
            row_end = indptr_ptr[row + 1]
            row_elems = row_end - row_start
            with irb.for_range(0, row_elems, name="idx") as idx:
                elem = row_start + idx
                dot[0] += data_ptr[elem] * weight_ptr[indices_ptr[elem] * N + n]
            out_ptr[row * N + n] += dot[0]
    return irb.get()