Providing an example code snippet for approach 2
def __init__(...):
    ...
    self.quant_x = torch.quantization.QuantStub()
    self.quant_y = torch.quantization.QuantStub()
    self.dequant = torch.quantization.DeQuantStub()
    self.ff = torch.nn.quantized.FloatFunctional()
    ...

def forward(x, y):
    ...
    x = self.quant_x(x)
    y = self.quant_y(y)
    out = self.ff.add(x, y)
    ...