compile(with:feeds:targetTensors:targetOperations:compilationDescriptor:)
Compiles the graph for the given feeds to returns the target tensor values, ensuring all target operations would be executed.
Declaration
func compile(with device: MPSGraphDevice?, feeds: [MPSGraphTensor : MPSGraphShapedType], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, compilationDescriptor: MPSGraphCompilationDescriptor?) -> MPSGraphExecutableParameters
- device:
MPSGraph device to optimize for.
- 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.
- compilationDescriptor:
Compilation descriptor to set different compilation parameters.
Return Value
A valid MPSGraphExecutable object
Discussion
This call blocks until execution has completed. The compilation descriptor helps specialize the executable returned.