code: def test_fully_connected_inference():
      n = 1024
      l = 128
      m = 235
      bias = te.var("bias", dtype="float32")
      A = te.placeholder((l,), name="A")
      B = te.placeholder((m, l), name="B")
      C = nnpack.fully_connected_inference(A, B)
      D = te.compute(C.shape, lambda i: C[i] + bias, name="D")
      s = te.create_schedule(D.op)
  
      def verify(target="llvm"):
          if not tvm.get_global_func(
              "tvm.contrib.nnpack.fully_connected_inference", True
          ):
              pytest.skip("extern function is not available")
          if not nnpack.is_available():
              pytest.skip("nnpack is not available")
  
          dev = tvm.cpu(0)
          f = tvm.build(s, [A, B, D, bias], target)
          a = tvm.nd.array(
              np.random.uniform(size=(l)).astype(A.dtype), dev
          )
          b = tvm.nd.array(
              np.random.uniform(size=(m, l)).astype(B.dtype), dev
          )
          d = tvm.nd.array(np.zeros((m,), dtype=D.dtype), dev)
          bb = 10.0
          f(a, b, d, bb)
          tvm.testing.assert_allclose(
              d.numpy(), np.dot(a.numpy(), b.numpy().T) + bb, rtol=1e-5
          )
  
      verify()
  
file_path: tvm/tests/python/contrib/test_nnpack.py
imports: import tvm
  import tvm.testing
  from tvm import te
  import numpy
  import scipy.signal
  from tvm.topi.nn.utils import get_pad_tuple
  from tvm.contrib import nnpack
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_fully_connected_inference() without return types