docstr: Test a subgraph with a single max_pool operator.
docstr_tok: ["Test","a","subgraph","with","a","single","max_pool","operator","."]
code: def test_pool(
      self,
      pool_type,
      shape,
      dtype,
      pool_size,
      strides,
      padding,
      dilation,
      layout,
      ceil_mode,
      schedule_name,
  ):
      """Test a subgraph with a single max_pool operator."""
      ishape = shape
      input0 = relay.var("input", relay.TensorType(ishape, dtype))
  
      out0 = getattr(relay.op.nn, pool_type)(
          input0,
          pool_size=pool_size,
          strides=strides,
          dilation=dilation,
          padding=padding,
          layout=layout,
          out_layout="",
          ceil_mode=ceil_mode,
      )
  
      ref_mod = tvm.IRModule.from_expr(relay.Function([input0], out0))
  
      input1 = relay.var("input", relay.TensorType(ishape, dtype))
      out1 = getattr(relay.op.nn, pool_type)(
          input1,
          pool_size=pool_size,
          strides=strides,
          dilation=dilation,
          padding=padding,
          layout=layout,
          out_layout="",
          ceil_mode=ceil_mode,
      )
      mod = tvm.IRModule.from_expr(relay.Function([input1], out1))
  
      inputs = {
          "input": np.random.randint(
              low=-128, high=127, size=ishape, dtype=dtype
          )
      }
      output_list = generate_ref_data(ref_mod, inputs)
  
      compile_and_run(
          AOTTestModel(module=mod, inputs=inputs, outputs=output_list),
          runner=AOT_CORSTONE300_RUNNER,
          interface_api="c",
          use_unpacked_api=True,
          target_opts={
              "-keys": "arm_cpu",
              "-mcpu": "cortex-m7",
          },
          schedule_name=schedule_name,
      )
  
file_path: tvm/tests/python/relay/strategy/arm_cpu/test_max_pool.py
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.testing.aot import AOTTestModel, compile_and_run, generate_ref_data
  from tvm.micro.testing.aot_test_utils import AOT_CORSTONE300_RUNNER
label_desc: Use image node_id 1 for calling the BasicPoolTests obj's underlying member method code with example usage: obj.test_pool(pool_type, shape, dtype, pool_size, strides, padding, dilation, layout, ceil_mode, schedule_name) without return types