code: def compute(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
  
file_path: tvm/tests/python/contrib/test_hexagon/test_software_pipeline_async.py
imports: import numpy
  import tvm
  from tvm import tir
  from tvm.script import tir
  from .infrastructure import get_hexagon_target
label_desc: Use image node_id 1 for calling a global function with example usage: compute(comp_type, outer, inner, dtype) and returns: a_plus_1_primfunc, a_plus_b_plus_1_primfunc