class_docstr: For Testing Tanh fp16 op
docstr: Top Level testing function for tanh fp16 op
docstr_tok: ["Top","Level","testing","function","for","tanh","fp16","op"]
code: def test_tanh(
      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 tanh fp16 op"""
  
      A = te.placeholder(input_shape, name="A", dtype=dtype)
      M = sl.tanh_te_compute(A)
      tanhf16_func = te.create_prim_func([A, M])
      tir_s = sl.tanhf16_schedule(
          tanhf16_func, input_layout, output_layout
      )
      A_data = allocate_hexagon_array(
          hexagon_session.device,
          data=transformed_input_np,
          axis_separators=axis_sep,
          mem_scope=working_scope,
      )
      M_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, [A, M], name="tanhf16")
          runtime_module = tvm.build(
              tir_irm, target=get_hexagon_target("v69"), name="tanhf16"
          )
      mod = hexagon_session.load_module(runtime_module)
  
      mod(A_data, M_data)
      output_np = M_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_tanh_slice.py
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import te
  import tvm.topi.hexagon.slice_ops
  import tvm.contrib.hexagon
  from tvm.contrib.hexagon import allocate_hexagon_array
  from ...infrastructure import transform_numpy, get_hexagon_target
label_desc: Use image node_id 5 for calling the TestTanhSlice obj's underlying member method code with example usage: obj.test_tanh(input_shape, dtype, input_layout, output_layout, transformed_input_np, transformed_expected_output_np, axis_sep, hexagon_session, working_scope) without return types