def test_iO16_default_fp16_input(self, float32_input_model_add_op):
        """
        With minimum_deployment_target set >= iOS16, and if the compute precision is
        set to fp16. By default, a fp16 i/o model is produced.
        However, if the users specify the dtype, the converter is going to respect that.
        """
        # Case 1: Inputs given / outputs None
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20))],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp16",
            output_dtype="fp16",
            expected_op_list=["add"],
        )

        # Case 2: Inputs given / outputs given
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20), dtype=None)],
            outputs=[ct.TensorType(dtype=None)],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp16",
            output_dtype="fp16",
            expected_op_list=["add"],
        )

        # Case 3: Inputs set fp32 / outputs None
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20), dtype=np.float32)],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp32",
            output_dtype="fp16",
            expected_op_list=["cast", "add"],
        )

        # Case 4: Inputs set fp32 / outputs given
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20), dtype=np.float32)],
            outputs=[ct.TensorType(dtype=None)],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp32",
            output_dtype="fp16",
            expected_op_list=["cast", "add"],
        )

        # Case 5: Inputs given / outputs set to fp32
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20))],
            outputs=[ct.TensorType(dtype=np.float32)],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp16",
            output_dtype="fp32",
            expected_op_list=["add", "cast"],
        )

        # Case 6: Inputs / outputs both set to fp32
        mlmodel = ct.convert(
            float32_input_model_add_op,
            inputs=[ct.TensorType(shape=(10, 20), dtype=np.float32)],
            outputs=[ct.TensorType(dtype=np.float32)],
            minimum_deployment_target=ct.target.iOS16,
        )
        self._verify_model_io(
            mlmodel,
            input_dtype="fp32",
            output_dtype="fp32",
            expected_op_list=["cast", "add", "cast"],
        )

        With minimum_deployment_target set >= iOS16, and if the compute precision is
        set to fp16. By default, a fp16 i/o model is produced.
        However, if the users specify the dtype, the converter is going to respect that.
        
coremltools/converters/mil/frontend/torch/test/test_torch_conversion_api.py