class_docstr: Base TestCase to be used for all conv-bn[-relu] fusion patterns.
class_docstr_tok: ["Base","TestCase","to","be","used","for","all","conv-bn","[","-relu","]","fusion","patterns","."]
code: def test_qat_inplace_add_relu(self):
      class M(torch.nn.Module):
          def __init__(self, conv_class):
              super().__init__()
              self.conv = conv_class(1, 1, 1)
              self.relu = torch.nn.ReLU(inplace=True)
  
          def forward(self, x):
              x0 = x
              x = self.conv(x)
              x += x0
              x = self.relu(x)
              return x
  
      assert self.dim in [1, 2]
      if self.dim == 1:
          example_inputs = (torch.randn(1, 1, 3),)
      else:
          example_inputs = (torch.randn(1, 1, 3, 3),)
  
      m = M(self.conv_class)
      self._verify_symmetric_xnnpack_qat_numerics(m, example_inputs)
  
imports: import copy
  import operator
  import unittest
  from typing import Any, Optional, Tuple, Type
  import torch
  from torch._export import capture_pre_autograd_graph
  from torch.ao.quantization import default_fake_quant, FusedMovingAvgObsFakeQuantize, MovingAverageMinMaxObserver, MovingAveragePerChannelMinMaxObserver, QConfigMapping
  from torch.ao.quantization.backend_config import get_qnnpack_backend_config
  from torch.ao.quantization.qconfig import default_per_channel_symmetric_qnnpack_qat_qconfig, default_symmetric_qnnpack_qat_qconfig
  from torch.ao.quantization.quantize_fx import prepare_qat_fx
  from torch.ao.quantization.quantize_pt2e import _convert_to_reference_decomposed_fx, convert_pt2e, prepare_pt2e, prepare_qat_pt2e
  from torch.ao.quantization.quantizer import DerivedQuantizationSpec, QuantizationAnnotation, QuantizationSpec, Quantizer
  from torch.ao.quantization.quantizer.xnnpack_quantizer import get_symmetric_quantization_config, XNNPACKQuantizer
  from torch.testing._internal.common_cuda import TEST_CUDA
  from torch.testing._internal.common_quantization import NodeSpec, QuantizationTestCase, skip_if_no_torchvision, skipIfNoQNNPACK
  from torch.testing._internal.common_quantized import override_quantized_engine
label_desc: Use image node_id 10 for calling the TestQuantizePT2EQAT_ConvBn_Base obj's underlying member method code with example usage: obj.test_qat_inplace_add_relu() and returns: x