disableAutoLayoutConversion
NewiOSmacOStvOSopen func disableAutoLayoutConversion()Turns off Automatic Layout Conversion (for conv like operations) for GPU.
MetalPerformanceShadersGraph builds and runs compute graphs of tensor operations on the GPU through Metal.
The 27 SDK adds 5 APIs, with no deprecations or removals. New entry points include run and several runAsync overloads for dispatching a graph, plus disableAutoLayoutConversion to opt out of automatic layout conversion.
disableAutoLayoutConversionopen func disableAutoLayoutConversion()Turns off Automatic Layout Conversion (for conv like operations) for GPU.
runopen func run(on commandQueue: any MTL4CommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
This call is synchronous and will return on completion of execution.
Parameters
commandQueueinputsArrayresultsArrayReturnsA valid MPSGraphTensorData array with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
runAsyncopen func runAsync(on commandQueue: any MTL4CommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetTensors: [MPSGraphTensor], targetOperations: [MPSGraphOperation]?, executionDescriptor: MPSGraphExecutionDescriptor?) -> [MPSGraphTensor : MPSGraphTensorData]Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed.
This call is asynchronous and will return immediately if a completionHandler is set.
Parameters
commandQueuefeedstargetTensorstargetOperationsexecutionDescriptorReturnsA valid MPSGraphTensor : MPSGraphTensorData dictionary with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
runAsyncopen func runAsync(on commandQueue: any MTL4CommandQueue, feeds: [MPSGraphTensor : MPSGraphTensorData], targetOperations: [MPSGraphOperation]?, resultsDictionary: [MPSGraphTensor : MPSGraphTensorData], executionDescriptor: MPSGraphExecutionDescriptor?)Encodes the graph for the given feeds to returns the target tensor values in the results dictionary provided by the user.
It ensures all target operations also executed. This call is asynchronous and will return immediately if a completionHandler is set.
Parameters
commandQueuefeedstargetOperationsresultsDictionaryexecutionDescriptorrunAsyncopen func runAsync(on commandQueue: any MTL4CommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]Runs the graph for the given feeds and returns the target tensor values, ensuring all target operations also executed. This call is asynchronous and will return immediately.
Parameters
commandQueueinputsArrayresultsArrayexecutionDescriptorReturnsA valid MPSGraphTensorData array with results synchronized to the CPU memory if MPSGraphOptionsSynchronizeResults set.
No APIs match your filter.