code: def add_partition_generic(ref_call, new_args, ctx):
      """Rewrite function for ewise add for partition for generic devices"""
      lhs_cond, lhs = partition_expr_check(new_args[0])
      rhs_cond, rhs = partition_expr_check(new_args[1])
      if lhs_cond and rhs_cond:
          # - introduced by ResNet, when for the first residual connection
          #     ...
          #     %0 = nn.conv2d(%data, %meta[relay.Constant])
          #     %1 = add(%0, %meta[relay.Constant])
          #     %2 = nn.relu(%1)
          #     %3 = nn.max_pool2d(%2)
          #     ...
          #     %9 = nn.conv2d(%8, %meta[relay.Constant])
          #     %10 = add(%9, %meta[relay.Constant])
          #     %11 = add(%3, %10)  <- need to insert annotations for %3, %10
          #     ...
          lhs = new_args[0].realize()
          rhs = new_args[1].realize()
          return QPartitionExpr(_forward_op(ref_call, [lhs, rhs]))
      if not lhs_cond and rhs_cond:
          # - introduced by residual connection in ResNet
          #     ...
          #     %13 = nn.conv2d(%12, %meta[relay.Constant])
          #     %14 = add(%13, %meta[relay.Constant])
          #     %15 = annotation.cast_hint(%15, 'int8')
          #     %16 = annotation.stop_fusion(%16)
          #     %17 = add(%5, %16)
          #     %18 = nn.relu(%17)
          #     ...
          #     %24 = nn.conv2d(%23, %meta[relay.Constant])
          #     %25 = add(%24, %meta[relay.Constant])
          #     %26 = add(%18, %25)  <- need to insert annotations for %25
          #     ...
          rhs = new_args[1].realize()
          return _forward_op(ref_call, [lhs, rhs])
      if lhs_cond and not rhs_cond:
          if _analysis.check_constant(rhs):
              # - introduced by batch_norm: add(out, bias)
              return QPartitionExpr(_forward_op(ref_call, [lhs, rhs]))
          # - introduced by residual connection in MobileNetV2
          #     ...
          #     %81 = add(%80, meta[relay.Constant])
          #     %82 = annotation.cast_hint(%81, 'int8')
          #     %83 = annotation.stop_fusion(%82)
          #     %84 = add(%79, %83)
          #     ...
          #     %96 = nn.conv2d(%94, %meta[relay.Constant])
          #     %96 = add(%95, %meta[relay.Constant])
          #     %97 = add(%96, %84)  <- need to insert annotations for %96
          #     ...
          lhs = new_args[0].realize()
          return _forward_op(ref_call, [lhs, rhs])
      if not lhs_cond and not rhs_cond:
          # trivial case
          return None
  
      raise ValueError
  
file_path: tvm/python/tvm/relay/quantize/_partition.py
imports: import tvm
  from ..None import expr
  from ..None import analysis
  from .None import _quantize
  from .quantize import _forward_op
label_desc: Use image node_id 5 for calling a global function with example usage: add_partition_generic(ref_call, new_args, ctx) and returns: QPartitionExpr, _forward_op, _forward_op, None, QPartitionExpr