class_docstr: For testing Dequantize Slice ops
class_docstr_tok: ["For","testing","Dequantize","Slice","ops"]
docstr: Top level testing function for dequantize
docstr_tok: ["Top","level","testing","function","for","dequantize"]
code: def test_dequant_qnn(
      self,
      input_shape,
      dtype,
      input_layout,
      output_layout,
      transformed_input_np,
      transformed_expected_output_np,
      axis_sep,
      hexagon_session,
      working_scope,
  ):
      """
      Top level testing function for dequantize
      """
  
      dequant_input = te.placeholder(input_shape, name="A", dtype=dtype)
  
      in_data_np, in_scale, in_zero_pt = transformed_input_np
  
      dequant_output = qnn.dequantize_compute(
          dequant_input, in_scale, in_zero_pt
      )
  
      tir_s = qnn.dequantize_schedule(
          dequant_input, dequant_output, input_layout, output_layout
      )
  
      input_data = allocate_hexagon_array(
          hexagon_session.device,
          data=in_data_np,
          axis_separators=axis_sep,
          mem_scope=working_scope,
      )
      output_data = allocate_hexagon_array(
          hexagon_session.device,
          tensor_shape=transformed_expected_output_np.shape,
          dtype=transformed_expected_output_np.dtype,
          axis_separators=axis_sep,
          mem_scope=working_scope,
      )
      with tvm.transform.PassContext(opt_level=3):
          tir_irm = tvm.lower(
              tir_s.mod,
              [dequant_input, dequant_output],
              name="dequantize",
          )
          runtime_module = tvm.build(
              tir_irm,
              target=get_hexagon_target("v69"),
              name="dequantize",
          )
      mod = hexagon_session.load_module(runtime_module)
  
      mod(input_data, output_data)
      output_np = output_data.numpy()
      tvm.testing.assert_allclose(
          output_np,
          transformed_expected_output_np,
          1e-3,
          1e-3,
      )
  
file_path: tvm/tests/python/contrib/test_hexagon/topi/slice_op/test_dequantize_slice.py
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import te
  from tvm.topi.hexagon import qnn
  from tvm.contrib.hexagon import allocate_hexagon_array
  from ...infrastructure import transform_numpy, quantize_np, get_hexagon_target
label_desc: Use image node_id 5 for calling the TestDequantizeSlice2d obj's underlying member method code with example usage: obj.test_dequant_qnn(input_shape, dtype, input_layout, output_layout, transformed_input_np, transformed_expected_output_np, axis_sep, hexagon_session, working_scope) without return types