code: def partition_for_cudnn(mod: tvm.IRModule) -> tvm.IRModule:
      """Partition the graph to offload for cuDNN.
  
      Parameters
      ----------
      mod : tvm.IRModule
          The module to partition.
  
      Returns
      -------
      tvm.IRModule
          The partitioned module.
      """
  
      seq = tvm.transform.Sequential(
          [
              transform.InferType(),
              transform.MergeComposite(pattern_table()),
              transform.AnnotateTarget("cudnn"),
              transform.PartitionGraph(),
              transform.InferType(),
          ]
      )
      return seq(mod)
  
file_path: tvm/python/tvm/relay/op/contrib/cudnn.py
imports: from typing import Callable, List, Tuple
  import tvm
  import tvm.ir
  from tvm import relay
  from tvm import te
  from tvm.relay import transform
  from tvm.contrib import cudnn
  from ...dataflow_pattern import is_op, wildcard
  from .te_target import lower_composite, relay_to_runtime
  from .register import register_pattern_table
label_desc: Use image node_id 1 for calling a global function with example usage: partition_for_cudnn(mod) and returns: seq