code: def intrin_vadd(xo, m, n):
      x = te.placeholder((n,), name="vx")
      y = te.placeholder((n,), name="vy")
      if m % n == 0:
          body = lambda i: x[i] + y[i]
      else:
          body = lambda i: tvm.tir.Select(
              xo * n + i < m,
              x[i] + y[i],
              tvm.tir.const(0, dtype=x.dtype),
          )
      z = te.compute(x.shape, body, name="z")
  
      def intrin_func(ins, outs):
          xx, yy = ins
          zz = outs[0]
          # special handle needed to tackle tail loop part when m % n != 0
          # here is tvm.min(n, m - xo * n)
          return tvm.tir.call_packed("vadd", xx, yy, zz)
  
      buffer_params = {"offset_factor": 16}
      return te.decl_tensor_intrin(
          z.op, intrin_func, default_buffer_params=buffer_params
      )
  
file_path: tvm/tests/python/te/test_te_schedule_tensorize.py
imports: import tvm
  from tvm import te
label_desc: Use image node_id 1 for calling a global function with example usage: intrin_vadd(xo, m, n) and returns: te, tvm