code: def test_rfactor_init():
      """Test rfactors with constant inits."""
      num_n = 1027
      arr_length = tvm.runtime.convert(num_n)
      placeholder_a = te.placeholder((arr_length, arr_length), name="A")
      placeholder_c = te.placeholder((arr_length, arr_length), name="C")
      placeholder_i = te.placeholder((arr_length, arr_length), name="I")
      axis_k = te.reduce_axis((0, arr_length))
      result_b = te.compute(
          (arr_length, arr_length),
          lambda i, j: te.sum(
              placeholder_a[i, axis_k] * placeholder_c[axis_k, j],
              axis=axis_k,
              init=placeholder_i[i, j],
          ),
          name="B",
      )
  
      # schedule
      schedule = te.create_schedule(result_b.op)
      axis_kf, _ = schedule[result_b].split(axis_k, nparts=4)
      rfactor_bf = schedule.rfactor(result_b, axis_kf, 1)
      schedule[rfactor_bf].parallel(rfactor_bf.op.axis[0])
  
      # one line to build the function.
      def check_target(target="llvm"):
          if not tvm.runtime.enabled(target):
              return
          dev = tvm.cpu(0)
          fapi = tvm.lower(
              schedule,
              args=[
                  placeholder_a,
                  placeholder_c,
                  placeholder_i,
                  result_b,
              ],
          )
          print(fapi)
          mmult = tvm.build(fapi, target=target, name="mmult")
          # launch the kernel.
          buff_a = tvm.nd.array(
              np.random.uniform(size=(num_n, num_n)).astype(
                  placeholder_a.dtype
              ),
              dev,
          )
          buff_c = tvm.nd.array(
              np.random.uniform(size=(num_n, num_n)).astype(
                  placeholder_c.dtype
              ),
              dev,
          )
          buff_i = tvm.nd.array(
              np.random.uniform(size=(num_n, num_n)).astype(
                  result_b.dtype
              ),
              dev,
          )
          buff_b = tvm.nd.array(
              np.zeros((num_n, num_n), dtype=result_b.dtype), dev
          )
          mmult(buff_a, buff_c, buff_i, buff_b)
          res = buff_i.numpy() + np.matmul(
              buff_a.numpy(), buff_c.numpy()
          )
          tvm.testing.assert_allclose(buff_b.numpy(), res, rtol=1e-4)
  
      check_target()
  
file_path: tvm/tests/python/integration/test_reduce.py
imports: import numpy
  import tvm
  from tvm import te, topi
  from tvm.driver.build_module import schedule_to_module
  import tvm.testing
  import tvm.topi.testing
label_desc: Use image node_id 5 for calling a global function with example usage: test_rfactor_init() without return types