code: def test_constant():
      """Test the subgraph with (var, const, ...) arguments."""
      if not tvm.get_global_func("runtime.DNNLJSONRuntimeCreate", True):
          print("skip because DNNL codegen is not available")
          return
  
      dtype = "float32"
      ishape = (1, 32, 14, 14)
      wshape = (32, 32, 3, 3)
  
      data = relay.var("data", shape=ishape, dtype=dtype)
      weight = relay.var("weight", shape=wshape, dtype=dtype)
      bn_gamma = relay.var("bn_gamma")
      bn_beta = relay.var("bn_beta")
      bn_mmean = relay.var("bn_mean")
      bn_mvar = relay.var("bn_var")
  
      layer = relay.nn.conv2d(
          data=data, weight=weight, kernel_size=(3, 3), padding=(1, 1)
      )
      bn_output = relay.nn.batch_norm(
          layer, bn_gamma, bn_beta, bn_mmean, bn_mvar
      )
      out = bn_output[0]
      out = relay.nn.relu(out)
  
      func = relay.Function(relay.analysis.free_vars(out), out)
      ref_mod, params = tvm.relay.testing.create_workload(func)
      ref_mod["main"] = bind_params_by_name(ref_mod["main"], params)
  
      remove_bn_pass = tvm.transform.Sequential(
          [
              transform.InferType(),
              transform.SimplifyInference(),
              transform.FoldConstant(),
              transform.FoldScaleAxis(),
          ]
      )
  
      dnnl_patterns = get_pattern_table("dnnl")
      composite_partition = tvm.transform.Sequential(
          [
              transform.MergeComposite(dnnl_patterns),
              transform.AnnotateTarget("dnnl"),
              transform.PartitionGraph(),
          ]
      )
  
      with tvm.transform.PassContext(
          opt_level=3, disabled_pass=["AlterOpLayout"]
      ):
          ref_mod = remove_bn_pass(ref_mod)
          mod = composite_partition(ref_mod)
  
      i_data = np.random.uniform(0, 1, ishape).astype(dtype)
      check_result(
          mod, ref_mod, {"data": i_data}, (1, 32, 14, 14), tol=1e-5
      )
  
imports: import os
  import sys
  import numpy
  import tvm
  import tvm.relay.op
  import tvm.relay.testing
  from tvm import relay, runtime
  from tvm.contrib import utils
  from tvm.relay import transform
  from tvm.relay.backend import te_compiler
  from tvm.relay.build_module import bind_params_by_name
  from tvm.relay.op.contrib.register import get_pattern_table
label_desc: Use image node_id 11 for calling a global function with example usage: test_constant() without return types