---
title: "getOutputTypes(with:inputTypes:compilationDescriptor:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraphexecutable/getoutputtypes(with:inputtypes:compilationdescriptor:)"
---

# getOutputTypes(with:inputTypes:compilationDescriptor:)

Get output shapes for a specialized executable.

## Declaration

```swift
func getOutputTypes(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?) -> [MPSGraphShapedType]?
```

## Parameters

- `device`: Optional MPSGraph device to compile with
- `inputTypes`: Input types expected to be passed to the executable.
- `compilationDescriptor`: CompilationDescriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.

## Discussion

Discussion In case specialization has not been done yet then calling this function will specialize for the given input shapes.
