def test_reorder_not_happen(self):
        """The scale won't be moved when the scaled weight is used in unsupported ops."""

        @mb.program(
            input_specs=[mb.TensorSpec(shape=(4, 16), dtype=types.fp16)],
            opset_version=ct.target.iOS18,
        )
        def prog(x):
            scaled_weight = self._get_lut_pcs_weight((2, 16))
            linear_output1 = mb.linear(x=x, weight=scaled_weight)
            add_out = mb.add(x=scaled_weight, y=np.float16(1.0))
            linear_output2 = mb.linear(x=x, weight=add_out)
            return mb.add(x=linear_output1, y=linear_output2)

        prev_prog, _, block = apply_pass_and_basic_check(
            prog, "common::reorder_lut_per_channel_scale", skip_essential_scope_check=True
        )
        assert get_op_types_in_program(prog) == get_op_types_in_program(prev_prog)
The scale won't be moved when the scaled weight is used in unsupported ops.
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py