code: def pattern_table() -> (
      List[Tuple[str, relay.Pattern, Callable[[relay.Call], bool]]]
  ):
      """Get the cuDNN pattern table."""
  
      def softmax_pattern() -> relay.Pattern:
          """Create pattern for softmax."""
          return is_op("nn.softmax")(wildcard())
  
      def log_softmax_pattern() -> relay.Pattern:
          """Create pattern for log_softmax."""
          return is_op("nn.log_softmax")(wildcard())
  
      def conv2d_pattern() -> relay.Pattern:
          """Create pattern for conv2d."""
          return is_op("nn.conv2d")(wildcard(), wildcard())
  
      def conv2d_bias_act_pattern() -> relay.Pattern:
          """Create pattern for fused conv2d+bias+activation."""
          conv2d = is_op("nn.conv2d")(wildcard(), wildcard())
          bias = is_op("nn.bias_add")(conv2d, wildcard())
          return bias.optional(is_op("nn.relu"))
  
      def check_softmax(matched: relay.Call) -> bool:
          """Check if softmax is supported by cuDNN."""
          if matched.args[0].checked_type.dtype not in [
              "float64",
              "float32",
              "float16",
          ]:
              return False
  
          return True
  
      def check_log_softmax(matched: relay.Call) -> bool:
          """Check if log_softmax is supported by cuDNN."""
          if matched.args[0].checked_type.dtype not in [
              "float64",
              "float32",
              "float16",
          ]:
              return False
  
          if len(matched.args[0].checked_type.shape) != 2:
              return False
  
          if matched.attrs["axis"] not in (1, -1):
              return False
  
          return True
  
      def check_conv2d(matched: relay.Call) -> bool:
          if matched.args[0].checked_type.dtype not in [
              "float64",
              "float32",
              "float16",
          ]:
              return False
  
          if (
              matched.attrs["data_layout"] != "NCHW"
              or matched.attrs["kernel_layout"] != "OIHW"
          ):
              return False
  
          padding = matched.attrs["padding"]
          if padding[0] != padding[2] or padding[1] != padding[3]:
              return False
  
          return True
  
      def check_conv2d_bias_act(matched: relay.Call) -> bool:
          return True
  
      return [
          ("cudnn.softmax", softmax_pattern(), check_softmax),
          (
              "cudnn.log_softmax",
              log_softmax_pattern(),
              check_log_softmax,
          ),
          (
              "cudnn.conv2d_bias_act",
              conv2d_bias_act_pattern(),
              check_conv2d_bias_act,
          ),
          ("cudnn.conv2d", conv2d_pattern(), check_conv2d),
      ]
  
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 2 for calling a global function with example usage: pattern_table() and returns: list, is_op, is_op, is_op, bias, True, True, True, True, False, False, False, False, False, False, False