code: def conv2d(
      input,
      weight,
      bias,
      stride=1,
      padding=0,
      dilation=1,
      groups=1,
      padding_mode="zeros",
      scale=1.0,
      zero_point=0,
      dtype=torch.quint8,
  ):
      r"""
      Applies a 2D convolution over a quantized 2D input composed of several input
      planes.
  
      See :class:`~torch.ao.nn.quantized.Conv2d` for details and output shape.
  
      Args:
          input: quantized input tensor of shape :math:`(\text{minibatch} , \text{in\_channels} , iH , iW)`
          weight: quantized filters of shape :math:`(\text{out\_channels} , \frac{\text{in\_channels}}{\text{groups}} , kH , kW)`
          bias: **non-quantized** bias tensor of shape :math:`(\text{out\_channels})`. The tensor type must be `torch.float`.
          stride: the stride of the convolving kernel. Can be a single number or a
            tuple `(sH, sW)`. Default: 1
          padding: implicit paddings on both sides of the input. Can be a
            single number or a tuple `(padH, padW)`. Default: 0
          dilation: the spacing between kernel elements. Can be a single number or
            a tuple `(dH, dW)`. Default: 1
          groups: split input into groups, :math:`\text{in\_channels}` should be divisible by the
            number of groups. Default: 1
          padding_mode: the padding mode to use. Only "zeros" is supported for quantized convolution at the moment. Default: "zeros"
          scale: quantization scale for the output. Default: 1.0
          zero_point: quantization zero_point for the output. Default: 0
          dtype: quantization data type to use. Default: ``torch.quint8``
  
      Examples::
  
          >>> # xdoctest: +REQUIRES(env:TORCH_DOCTEST_QENGINE)
          >>> from torch.ao.nn.quantized import functional as qF
          >>> filters = torch.randn(8, 4, 3, 3, dtype=torch.float)
          >>> inputs = torch.randn(1, 4, 5, 5, dtype=torch.float)
          >>> bias = torch.randn(8, dtype=torch.float)
          >>>
          >>> scale, zero_point = 1.0, 0
          >>> dtype_inputs = torch.quint8
          >>> dtype_filters = torch.qint8
          >>>
          >>> q_filters = torch.quantize_per_tensor(filters, scale, zero_point, dtype_filters)
          >>> q_inputs = torch.quantize_per_tensor(inputs, scale, zero_point, dtype_inputs)
          >>> qF.conv2d(q_inputs, q_filters, bias, padding=1, scale=scale, zero_point=zero_point)
      """  # noqa: E501
      if padding_mode != "zeros":
          raise NotImplementedError("Only zero-padding is supported!")
      if input.dtype != torch.quint8:
          raise NotImplementedError(
              "Only torch.quint8 is supported for activation tensor!"
          )
      if weight.dtype != torch.qint8:
          raise NotImplementedError(
              "Only torch.qint8 is supported for weight tensor!"
          )
      if input.ndim != 4:
          raise ValueError("Input shape must be `(N, C, H, W)`!")
      stride = _pair(stride)
      padding = _pair(padding)
      dilation = _pair(dilation)
  
      packed_params = torch.ops.quantized.conv2d_prepack(
          weight, bias, stride, padding, dilation, groups
      )
      return torch.ops.quantized.conv2d(
          input, packed_params, scale, zero_point
      )
  
imports: from typing import List, Optional
  import warnings
  import torch
  from torch import Tensor
  from torch.nn.modules.utils import _pair, _triple
  from torch.jit.annotations import BroadcastingList2
  from .modules.utils import _pair_from_first
label_desc: Use image node_id 6 for calling a global function with example usage: conv2d(input, weight, bias, stride, padding, dilation, groups, padding_mode, scale, zero_point, dtype) and returns: torch