code: def test_tanh(dtype, shape):
      """Compare Tanh output with TVM."""
      zp_min = np.iinfo(dtype).min
      zp_max = np.iinfo(dtype).max
  
      np.random.seed(0)
      inputs = {
          "a": tvm.nd.array(
              np.random.randint(
                  zp_min, high=zp_max, size=shape, dtype=dtype
              )
          ),
      }
      outputs = []
      for npu in [False, True]:
          model = _get_model(
              shape, zp_min + 128, 1 / 256, zp_min + 128, 1 / 128, dtype
          )
          mod = tei.make_module(model, [])
          outputs.append(
              tei.build_and_run(
                  mod,
                  inputs,
                  1,
                  {},
                  npu=npu,
                  additional_config_args={
                      "inline_non_compute_intensive_partitions": False
                  },
              )
          )
  
      tei.verify(outputs, dtype, 1)
  
file_path: tvm/tests/python/contrib/test_ethosn/test_tanh.py
imports: import pytest
  import numpy
  import tvm
  from tvm import relay
  from tvm.testing import requires_ethosn
  from .None import infrastructure
label_desc: Use image node_id 2 for calling a global function with example usage: test_tanh(dtype, shape) without return types