code: def test_tflite_model_u3_usecase_conv2d_var_cons(usmp_algo):
      """This checks for inference using workspace and constant pools placed in the application"""
  
      mod = tvm.relay.fromtext(
          """\
          #[version = "0.0.5"]
          def @main(%data : Tensor[(1, 3, 64, 64), uint8], %weight : Tensor[(3, 3, 5, 5), int8]) {
              %1 = nn.conv2d(
                   %data,
                   %weight,
                   padding=[2, 2],
                   channels=3,
                   kernel_size=[5, 5],
                   data_layout="NCHW",
                   kernel_layout="OIHW",
                   out_dtype="int32");
              %2 = cast(nn.max_pool2d(%1, pool_size=[3, 3]), dtype="int8");
              %3 = nn.conv2d(
                   %2,
                   %weight,
                   padding=[2, 2],
                   channels=3,
                   kernel_size=[5, 5],
                   data_layout="NCHW",
                   kernel_layout="OIHW",
                   out_dtype="int32");
              %4 = nn.max_pool2d(%3, pool_size=[3, 3]);
              %4
          }
      """
      )
  
      main_func = mod["main"]
      shape_dict = {
          p.name_hint: p.checked_type.concrete_shape
          for p in main_func.params
      }
      type_dict = {
          p.name_hint: p.checked_type.dtype for p in main_func.params
      }
  
      weight_data = np.random.randint(
          1, 255, shape_dict["weight"]
      ).astype(type_dict["weight"])
      input_data = np.ones(shape_dict["data"]).astype(type_dict["data"])
      params = {"weight": weight_data}
      inputs = {"data": input_data}
  
      use_unpacked_api = True
      interface_api = "c"
  
      target = tvm.target.Target("c")
      workspace_mem_pools = WorkspaceMemoryPools(
          [
              WorkspacePoolInfo(
                  "my_memory_pool_1",
                  [target],
                  PoolInfoProperties(size_hint_bytes=8500000),
              ),
          ]
      )
  
      constant_mem_pools = ConstantMemoryPools(
          [
              ConstantPoolInfo("my_const_pool_1", [target], []),
          ]
      )
  
      test_runner = AOTTestRunner(
          pass_config={
              "tir.usmp.enable": True,
              "tir.usmp.algorithm": usmp_algo,
          },
          prologue=f"""
          __attribute__((section(".bss.noinit"), aligned(TVM_RUNTIME_ALLOC_ALIGNMENT_BYTES)))
          static uint8_t my_memory_pool_1[{_get_workspace_size_define_macro("my_memory_pool_1")}];
          __attribute__((section(".rodata.tvm"), aligned(TVM_RUNTIME_CONST_ALLOC_ALIGNMENT_BYTES)))
          static uint8_t my_const_pool_1[{_get_constant_size_define_macro("my_const_pool_1")}] = {{ {_get_constant_data_define_macro("my_const_pool_1")} }};
          """,
      )
  
      output_list = generate_ref_data(mod, inputs, params)
  
      compiled_test_mods = compile_models(
          AOTTestModel(
              module=mod,
              inputs=inputs,
              outputs=output_list,
              params=params,
          ),
          interface_api=interface_api,
          use_unpacked_api=use_unpacked_api,
          pass_config=test_runner.pass_config,
          workspace_memory_pools=workspace_mem_pools,
          constant_memory_pools=constant_mem_pools,
          target=target,
      )
  
      for compiled_model in compiled_test_mods:
          _check_for_no_tvm_backendallocworkspace_calls(
              compiled_model.executor_factory.lib
          )
  
      run_and_check(
          models=compiled_test_mods,
          runner=test_runner,
          interface_api=interface_api,
      )
  
imports: from collections import OrderedDict
  import re
  import random
  import numpy
  import pytest
  import tvm
  from tvm import relay
  from tvm.relay import testing
  from tvm.relay import transform
  from tvm.relay.op.annotation import compiler_begin, compiler_end
  from tvm.relay.backend import Executor, Runtime
  from tvm import WorkspaceMemoryPools, ConstantMemoryPools, WorkspacePoolInfo, ConstantPoolInfo, PoolInfoProperties
  from tvm.micro import model_library_format
  from tvm.micro.testing.aot_test_utils import parametrize_aot_options
  from tvm.testing.aot import AOTTestModel, AOTTestRunner, generate_ref_data, compile_and_run, compile_models, run_and_check, create_relay_module_and_inputs_from_tflite_file
  from tvm.testing.usmp import is_tvm_backendallocworkspace_calls
label_desc: Use image node_id 12 for calling a global function with example usage: test_tflite_model_u3_usecase_conv2d_var_cons(usmp_algo) without return types