code: def _get_elemwise_add_reference_value_tensors(
      shape: list, dtype: str
  ):
      """
      Return [A:np.array, B:np.array, C:np.array]
  
      `A`, `B`, and `C` are reference data used to exercise and validate
      an elementwise-add kernel: C = A+B.
  
      NOTE: These data are primarily meant for performance testing.
      The values may be helpful in detecting correctness issues, but that's
      a secondary consideration here.
      """
      assert len(shape) == 2
  
      input1 = np.ndarray(shape, dtype=dtype)
      input2 = np.ndarray(shape, dtype=dtype)
  
      np_dtype = input1.dtype
  
      if np_dtype.kind in ["i", "u"]:
          # We allow overflow for integer types because it tends to be well-behaved
          # and well-understood...
          min_value = np.iinfo(np_dtype).min
          max_value = np.iinfo(np_dtype).max
  
          next_value = min_value
  
          for i in range(shape[0]):
              for j in range(shape[1]):
                  input1[i, j] = next_value
                  input2[i, j] = next_value * 2
                  next_value += 1
  
      elif np_dtype.kind == "f":
          # NOTE: For simplicity, we avoid test data that require
          # well-defined behavior on floating-point overflow.
          # But it may be reasonable to test that in the future.
          min_value = np.finfo(np_dtype).min
          max_value = np.finfo(np_dtype).max
  
          min_input_value = min_value / 2.0 + 1
          max_input_value = max_value / 2.0 - 2
          delta = (max_input_value - min_input_value) / (
              shape[0] * shape[1]
          )
  
          next_value = min_input_value
  
          for i in range(shape[0]):
              for j in range(shape[1]):
                  input1[i, j] = next_value
                  input2[i, j] = next_value + 1
                  next_value += delta
  
      else:
          assert False, f"Unexpected data type: {np_dtype}"
  
      output = input1 + input2
      return [
          input1,
          input2,
          output,
      ]
  
file_path: tvm/tests/python/contrib/test_hexagon/test_benchmark_elemwise_add.py
imports: import os
  import os.path
  import sys
  import tempfile
  import numpy
  import pytest
  import tvm.script
  import tvm.testing
  from tvm.contrib.hexagon.session import Session
  from tvm.script import tir
  from .None import benchmark_util
  from .infrastructure import get_hexagon_target
label_desc: Use image node_id 3 for calling a global function with example usage: _get_elemwise_add_reference_value_tensors(shape, dtype) and returns: list