class_docstr: TestElementWise
docstr: Test function to check expected_physical_dimensions for cached buffers
docstr_tok: ["Test","function","to","check","expected_physical_dimensions","for","cached","buffers"]
code: def test_cache_shape(
      self, ir_module, input_layout, working_layout, output_layout
  ):
      """Test function to check expected_physical_dimensions for cached buffers"""
      func = ir_module["main"]
      for buffer in extract_buffers(func.body):
          buffer_layout = {
              "Input": input_layout,
              "Input.global": working_layout,
              "Output.global": working_layout,
              "Input.global.vtcm": working_layout,
              "Output.global.vtcm": working_layout,
              "Output": output_layout,
          }[buffer.name.replace("_", ".")]
  
          expected_physical_dimensions = {
              "nhwc": 1,
              "nchw-8h8w32c-1d": 1,
              "nchw-8h8w32c-2d": 2,
          }[buffer_layout]
  
          assert len(buffer.shape) == expected_physical_dimensions
  
imports: import contextlib
  import numpy
  import pytest
  import tvm
  import tvm.contrib.hexagon
  import tvm.testing
  from tvm import te
  from tvm.contrib.hexagon.pytest_plugin import requires_hexagon_toolchain
  from tvm.tir.stmt_functor import post_order_visit
  from tvm.contrib.hexagon import allocate_hexagon_array
  from .infrastructure import get_hexagon_target
label_desc: Use image node_id 10 for calling the TestElementWise obj's underlying member method code with example usage: obj.test_cache_shape(ir_module, input_layout, working_layout, output_layout) without return types