class_docstr: QNN Dequantize test class.
docstr: Test qnn.dequantize
docstr_tok: ["Test","qnn.dequantize"]
code: def test_qnn_dequantize(
      self, hexagon_session: Session, idtype, input_shape
  ):
      """Test qnn.dequantize"""
  
      def gen_relay_expr_qnn(dtype, input_scale, input_zero_point):
          data = relay.var("data", shape=input_shape, dtype=dtype)
          qnn_dequantize = relay.qnn.dequantize(
              data,
              input_scale=relay.const(input_scale),
              input_zero_point=relay.const(input_zero_point),
          )
          return qnn_dequantize
  
      # Generate float data, then quantize it to produce input.
      ref_out = np.random.random(input_shape)
      data, scale, zero_point = quantize_np(ref_out, idtype)
      inputs = {"data": data}
  
      relay_mod = tvm.IRModule.from_expr(
          gen_relay_expr_qnn(idtype, scale, zero_point)
      )
  
      hexagon_mod = build_hexagon_module(relay_mod)
      hexagon_outs = execute_on_hexagon(
          hexagon_session, hexagon_mod, inputs
      )
      # We do
      #   original -[quantize]-> input -[dequantize]-> output
      # then compare "original" with "output". Use rtol=1 because of the quantized
      # format in the middle.
      assert_allclose(hexagon_outs, [ref_out], rtol=1, atol=1e-2)
  
imports: import numpy
  import tvm.testing
  import tvm.topi.testing
  from tvm import relay
  from tvm.contrib.hexagon.session import Session
  from tvm.contrib.hexagon.pytest_plugin import HEXAGON_AOT_LLVM_TARGET
  from tvm.relay.backend import Executor
  from tvm.relay.testing import run_opt_pass, run_infer_type
  from .infrastructure import quantize_np
label_desc: Use image node_id 1 for calling the TestQnnDequantize obj's underlying member method code with example usage: obj.test_qnn_dequantize(hexagon_session, idtype, input_shape) and returns: qnn_dequantize