MetalPerformanceShadersGraph · IOS API REFERENCE
MPSGraphExecutable
class · iOS 15.0+ · SDK 27.1
class MPSGraphExecutable
Members (12)
method · iOS 15.0+encode
TypeScriptencode(commandBuffer: _MetalPerformanceShaders_MPSCommandBuffer, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declarationfunc encode(to commandBuffer: MPSCommandBuffer, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 16.3+getOutputTypes
TypeScriptgetOutputTypes(device: (MPSGraphDevice) | null, inputTypes: Array<MPSGraphType>, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): (Array<MPSGraphShapedType>) | null
Swift declarationfunc getOutputTypes(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?) -> [MPSGraphShapedType]?
init · iOS 18.0+init
TypeScriptstatic initCoreMLPackageAtURLDescriptor(coreMLPackageURL: string, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): MPSGraphExecutable
Swift declarationinit(coreMLPackageAtURL coreMLPackageURL: URL, descriptor compilationDescriptor: MPSGraphCompilationDescriptor?)
init · iOS 17.0+init
TypeScriptstatic initPackageDescriptor(mpsgraphPackageURL: string, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): MPSGraphExecutable
Swift declarationinit(package mpsgraphPackageURL: URL, descriptor compilationDescriptor: MPSGraphCompilationDescriptor?)
method · iOS 15.0+runAsync
TypeScriptrunAsync(commandQueue: SDKHandle, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declarationfunc runAsync(with commandQueue: any MTLCommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 15.0+run
TypeScriptrun(commandQueue: SDKHandle, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declarationfunc run(with commandQueue: any MTLCommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 17.0+serialize
TypeScriptserialize(url: string, descriptor?: (MPSGraphExecutableSerializationDescriptor) | null): void
Swift declarationfunc serialize(package url: URL, descriptor: MPSGraphExecutableSerializationDescriptor?)
method · iOS 15.0+specialize
TypeScriptspecialize(device: (MPSGraphDevice) | null, inputTypes: Array<MPSGraphType>, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): void
Swift declarationfunc specialize(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?)
get · iOS 15.0+feedTensors
TypeScriptget feedTensors(): (Array<MPSGraphTensor>) | null
Swift declarationvar feedTensors: [MPSGraphTensor]? { get }
get · iOS 15.0+options
TypeScriptget options(): MPSGraphOptions
Swift declarationvar options: MPSGraphOptions { get set }
set · iOS 15.0+options
TypeScriptset options(value: MPSGraphOptions)
Swift declarationvar options: MPSGraphOptions { get set }
get · iOS 15.0+targetTensors
TypeScriptget targetTensors(): (Array<MPSGraphTensor>) | null
Swift declarationvar targetTensors: [MPSGraphTensor]? { get }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
MPSGraphExecutable.init()
inherited init: cannot prove legal (class declares 4 custom initializers)
All MetalPerformanceShadersGraph types →