def test_simple():
        """
        Input graph:

            input(fp32) -> relu -> output

        Output graph:

            input(fp16) -> cast(dtype="fp32") -> relu -> output,

            with function.output_types = [ct.TesorType(dtype=types.fp16)]

        """

        @mb.program(input_specs=[mb.TensorSpec(shape=(2, 3))])
        def prog(x):
            return mb.relu(x=x)

        graph_pass = add_fp16_cast()
        block = prog.functions["main"]
        graph_pass.transform_function_signatures(block)

        assert block.inputs["x"].dtype == types.fp16

        assert get_op_types_in_program(prog) == ["cast", "relu"]
        cast_op = block.find_ops(op_type="cast")[0]
        assert cast_op.dtype.val == "fp32"

        assert len(block.outputs) == 1
        assert block.outputs[0].dtype == types.fp32

        assert len(block.output_types) == 1
        assert block.output_types[0].dtype == types.fp16

        Input graph:

            input(fp32) -> relu -> output

        Output graph:

            input(fp16) -> cast(dtype="fp32") -> relu -> output,

            with function.output_types = [ct.TesorType(dtype=types.fp16)]

        
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py