def _get_test_program_conv_relu():
        """An iOS17 program with conv and relu."""
        @mb.program(
            input_specs=[mb.TensorSpec(shape=(1, 30, 10, 10))], opset_version=ct.target.iOS17
        )
        def prog(x):
            conv_weight = np.random.rand(90, 30, 2, 2).astype(np.float32)
            x = mb.cast(x=x, dtype="fp16")
            x = mb.conv(x=x, weight=conv_weight)
            x = mb.relu(x=x)
            x = mb.cast(x=x, dtype="fp32")
            return x

        return prog
An iOS17 program with conv and relu.
coremltools/test/optimize/coreml/test_passes.py