code: def test_basic():
      target = tvm.target.hexagon("v66", hvx=128)
  
      def check_add(offload):
          A = tvm.te.placeholder((128,), dtype="uint8", name="A")
          B = tvm.te.placeholder((128,), dtype="uint8", name="A")
          C = tvm.te.compute((128,), lambda i: A[i] + B[i], name="C")
          s = tvm.te.create_schedule(C.op)
  
          if offload:
              xo, xi = s[C].split(s[C].op.axis[0], nparts=1)
              s[C].bind(xo, tvm.te.thread_axis("pipeline"))
              m = tvm.build(
                  s, [C, A, B], target=target, name="offload_add"
              )
              hexm = m.imported_modules[0]
          else:
              hexm = tvm.build(
                  s,
                  [C, A, B],
                  target=tvm.target.Target(target, target),
                  name="native_add",
              )
  
          asm = hexm.get_source("s")
          vadds = re.findall(
              r"v[0-9]+.b = vadd\(v[0-9]+.b,v[0-9]+.b\)", asm
          )
          assert vadds  # Check that it's non-empty
  
      check_add(True)
      check_add(False)
  
file_path: tvm/tests/python/codegen/test_target_codegen_hexagon.py
imports: import numpy
  import os
  import pytest
  import re
  import sys
  import tvm
  import tvm.relay
  import tvm.testing
  import tvm.contrib.hexagon
label_desc: Use image node_id 2 for calling a global function with example usage: test_basic() without return types