def _mark_always_affine_layers_for_replacement(self, model: _fx.GraphModule):
        """
        Some layers like ReLU can be quantized with affine qscheme even when we want
        to use symmetric quantization (zero point = 0). This is because these layers
        always have a non-negative output. And thus, an affine activation post process layer attached
        after layers like these will always observe zero point as 0. This can possibly help us
        reduce quantization error because of the larger number of quantization levels available.
        (Symmetric quantization will force the output of these layers to use [0, 127] as the
        output range, but with affine quantization, we can use [0, 255]).

        prepare_qat_fx requires all modules being fused together to have the same QConfig.
        Thus, if we have a Conv followed by a ReLU and we want to set ReLU to have affine qscheme,
        we would have to set Conv to use affine qscheme as well. But this isn't correct because a stand alone
        Conv layer somewhere else in the network will also use affine qscheme which is undesirable
        we want to fix zero point to 0.

        Hence, we add this pass which replaces all occurrences of activation post process after
         ``always_affine_layers`` with an affine version.
        """
        # Note: For all these ops, whether or not we can use affine qscheme for them depends only on
        # the op itself or one preceding op.
        # Note: graph.nodes traverses the nodes in topological order
        for node in model.graph.nodes:
            if node.op == "call_module":
                layer = _find_target(model, node.target)
                if type(layer) in _always_affine_layers:
                    self._mark_act_post_process_for_replacement(node, model)
                elif isinstance(layer, tuple(_fused_quantized_layers)):
                    if type(layer.act) in _always_affine_layers:
                        self._mark_act_post_process_for_replacement(node, model)
                # layers which only scale the output can also use affine qcheme
                elif isinstance(layer, tuple(_scale_only_layers)):
                    arg_mod = _find_module(model, node.args[0])
                    if (
                        _is_activation_post_process(arg_mod)
                        and node.args[0] in self._modules_to_replace
                    ):
                        self._mark_act_post_process_for_replacement(node, model)
            elif node.op == "call_function":
                combine_op_type = _combine_op_type(node)
                if combine_op_type is not None:
                    if combine_op_type == _CombinationOpType.AddReLU:
                        self._mark_act_post_process_for_replacement(node, model)
                elif node.target in _always_affine_layers:
                    self._mark_act_post_process_for_replacement(node, model)

        Some layers like ReLU can be quantized with affine qscheme even when we want
        to use symmetric quantization (zero point = 0). This is because these layers
        always have a non-negative output. And thus, an affine activation post process layer attached
        after layers like these will always observe zero point as 0. This can possibly help us
        reduce quantization error because of the larger number of quantization levels available.
        (Symmetric quantization will force the output of these layers to use [0, 127] as the
        output range, but with affine quantization, we can use [0, 255]).

        prepare_qat_fx requires all modules being fused together to have the same QConfig.
        Thus, if we have a Conv followed by a ReLU and we want to set ReLU to have affine qscheme,
        we would have to set Conv to use affine qscheme as well. But this isn't correct because a stand alone
        Conv layer somewhere else in the network will also use affine qscheme which is undesirable
        we want to fix zero point to 0.

        Hence, we add this pass which replaces all occurrences of activation post process after
         ``always_affine_layers`` with an affine version.
        
coremltools/optimize/torch/quantization/_configure.py