class_docstr: Consists of tests testing functionality of creating lookup tables for integer operations.
class_docstr_tok: ["Consists","of","tests","testing","functionality","of","creating","lookup","tables","for","integer","operations","."]
code: def run_function_test(
      self,
      in_scale: float,
      in_zero_point: int,
      out_scale: float,
      out_zero_point: int,
      in_dtype: str,
      out_dtype: str,
      floating_point_func: Callable[[np.ndarray], np.ndarray],
      input_arg: relay.Expr = None,
      rtol=1e-7,
      atol=0,
  ):
      relay_lookup, input_arg = self.fake_identity_func_relay(
          input_arg=input_arg,
          floating_point_func=floating_point_func,
          in_scale=relay.const(in_scale, "float32"),
          in_zero_point=relay.const(in_zero_point, "int32"),
          out_scale=relay.const(out_scale, "float32"),
          out_zero_point=relay.const(out_zero_point, "int32"),
          in_dtype=in_dtype,
          out_dtype=out_dtype,
      )
      result = canonicalizations.run_const_expr(relay_lookup)
      np.testing.assert_allclose(
          floating_point_func(
              self.dequantize_numpy(
                  input_arg,
                  np_scale=in_scale,
                  np_zero_point=in_zero_point,
              )
          ),
          self.dequantize_numpy(
              result, np_scale=out_scale, np_zero_point=out_zero_point
          ),
          atol=atol,
          rtol=rtol,
      )
  
file_path: tvm/tests/python/relay/qnn/test_canonicalizations.py
imports: from typing import Callable
  import numpy
  from tvm import relay
  from tvm.relay.qnn.op import canonicalizations
label_desc: Use image node_id 4 for calling the TestIntegerTableLookupTable obj's underlying member method code with example usage: obj.run_function_test(in_scale, in_zero_point, out_scale, out_zero_point, in_dtype, out_dtype, floating_point_func, input_arg, rtol, atol) without return types