def adjust_shift_write(self):
        """Adjust the shift write of node.

        shift_write = min(ipos) - opos

        DPU compiler constraints of shift_write:
        1. -15 <= shift_write <= 15
        """
        for node in self.model.model.graph.node:
            if node.op_type not in ["Add"] or node.op_type not in ["Mul"]:
                continue
            ipos_layers = []
            iposes = []
            skip = False

            for input_id in range(len(node.input)):
                ipos_name = self.get_ipos_name_by_id(node, input_id)
                ipos_layers.append(ipos_name)
            for layer_id in ipos_layers:
                ipos, _ = self.get_pos_by_name(layer_id)
                if ipos is None:
                    logger.info(
                        "Fail to get quantize position for layer {}(input:{}) (output of layer {}), "
                        "skip adjust_shift_read for it.".format(ipos_layers[layer_id], layer_id, ipos_layers[layer_id])
                    )
                    skip = True
                iposes.append(ipos)
            opos_name = self.get_opos_name(node)
            opos, _ = self.get_pos_by_name(opos_name)
            if opos is None:
                logger.info(
                    "Fail to get quantize position for layer {}(output:0), skip adjust_shift_write for it.".format(
                        node.name
                    )
                )
            if skip:
                continue

            id_min = np.argmin(iposes)
            sw = iposes[id_min] - opos
            min_sw, max_sw = -15, 15

            new_sw = None
            if sw > max_sw:
                new_sw = max_sw
            elif sw < min_sw:
                new_sw = min_sw

            if new_sw is not None:
                new_opos = iposes[id_min] - new_sw
                self.set_pos(self.get_node_by_name(self.find_o_name(node.output[0])), new_opos)
                logger.info(
                    "Shift write of layer {} is {}({}-{}). It exceeds range [{}, {}]. "
                    "Modify opos from {} to {}.".format(
                        node.name,
                        int(sw),
                        int(iposes[id_min]),
                        int(opos),
                        int(min_sw),
                        int(max_sw),
                        int(opos),
                        int(new_opos),
                    )
                )
Adjust the shift write of node.

        shift_write = min(ipos) - opos

        DPU compiler constraints of shift_write:
        1. -15 <= shift_write <= 15
        
olive/passes/onnx/vitis_ai/refine.py