---
title: "runAsync(with:feeds:targetOperations:resultsDictionary:executionDescriptor:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/runasync(with:feeds:targetoperations:resultsdictionary:executiondescriptor:)"
---

# runAsync(with:feeds:targetOperations:resultsDictionary:executionDescriptor:)

Encodes the graph for the given feeds to returns the target tensor values in the results dictionary provided by the user.

## Declaration

```swift
func runAsync(with commandQueue: any MTLCommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetOperations: [MPSGraphOperation]?, resultsDictionary: [MPSGraphTensor : MPSGraphTensorData], executionDescriptor: MPSGraphExecutionDescriptor?)
```

## Parameters

- `commandQueue`: CommandQueue passed to exectute the graph on.
- `feeds`: Feeds dictionary for the placeholder tensors.
- `targetOperations`: Operations to be completed at the end of the run.
- `resultsDictionary`: MPSGraphTensors dictionary passed by user, these will be filled with graph output data.
- `executionDescriptor`: ExecutionDescriptor to be passed in and used.

## Discussion

Discussion It ensures all target operations also executed. This call is asynchronous and will return immediately if a completionHandler is set.
