runAsync(feeds:targetTensors:targetOperations:executionDescriptor:)
Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
Declaration
func runAsync(feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, executionDescriptor: MPSGraphExecutionDescriptor?) -> [MPSGraphTensor : MPSGraphTensorData]Parameters
- feeds:
Feeds dictionary for the placeholder tensors.
- targetTensors:
Tensors for which the caller wishes MPSGraphTensorData to be returned.
- targetOperations:
Operations to be completed at the end of the run.
- executionDescriptor:
ExecutionDescriptor to be passed in and used.
Return Value
A valid MPSGraphTensor : MPSGraphTensorData dictionary with results synchronized to the CPU memory.
Discussion
This call is asynchronous and will return immediately if a completionHandler is set.