One Logo Pool Ball
MetalPerformanceShadersGraph · IOS API REFERENCE

MPSGraphExecutable

class · iOS 15.0+ · SDK 27.1

class MPSGraphExecutable

Members (12)

method · iOS 15.0+

encode

TypeScript
encode(commandBuffer: _MetalPerformanceShaders_MPSCommandBuffer, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declaration
func encode(to commandBuffer: MPSCommandBuffer, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 16.3+

getOutputTypes

TypeScript
getOutputTypes(device: (MPSGraphDevice) | null, inputTypes: Array<MPSGraphType>, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): (Array<MPSGraphShapedType>) | null
Swift declaration
func getOutputTypes(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?) -> [MPSGraphShapedType]?
init · iOS 18.0+

init

TypeScript
static initCoreMLPackageAtURLDescriptor(coreMLPackageURL: string, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): MPSGraphExecutable
Swift declaration
init(coreMLPackageAtURL coreMLPackageURL: URL, descriptor compilationDescriptor: MPSGraphCompilationDescriptor?)
init · iOS 17.0+

init

TypeScript
static initPackageDescriptor(mpsgraphPackageURL: string, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): MPSGraphExecutable
Swift declaration
init(package mpsgraphPackageURL: URL, descriptor compilationDescriptor: MPSGraphCompilationDescriptor?)
method · iOS 15.0+

runAsync

TypeScript
runAsync(commandQueue: SDKHandle, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declaration
func runAsync(with commandQueue: any MTLCommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 15.0+

run

TypeScript
run(commandQueue: SDKHandle, inputsArray: Array<MPSGraphTensorData>, resultsArray?: (Array<MPSGraphTensorData>) | null, executionDescriptor?: (MPSGraphExecutableExecutionDescriptor) | null): Array<MPSGraphTensorData>
Swift declaration
func run(with commandQueue: any MTLCommandQueue, inputs inputsArray: [MPSGraphTensorData], results resultsArray: [MPSGraphTensorData]?, executionDescriptor: MPSGraphExecutableExecutionDescriptor?) -> [MPSGraphTensorData]
method · iOS 17.0+

serialize

TypeScript
serialize(url: string, descriptor?: (MPSGraphExecutableSerializationDescriptor) | null): void
Swift declaration
func serialize(package url: URL, descriptor: MPSGraphExecutableSerializationDescriptor?)
method · iOS 15.0+

specialize

TypeScript
specialize(device: (MPSGraphDevice) | null, inputTypes: Array<MPSGraphType>, compilationDescriptor?: (MPSGraphCompilationDescriptor) | null): void
Swift declaration
func specialize(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?)
get · iOS 15.0+

feedTensors

TypeScript
get feedTensors(): (Array<MPSGraphTensor>) | null
Swift declaration
var feedTensors: [MPSGraphTensor]? { get }
get · iOS 15.0+

options

TypeScript
get options(): MPSGraphOptions
Swift declaration
var options: MPSGraphOptions { get set }
set · iOS 15.0+

options

TypeScript
set options(value: MPSGraphOptions)
Swift declaration
var options: MPSGraphOptions { get set }
get · iOS 15.0+

targetTensors

TypeScript
get targetTensors(): (Array<MPSGraphTensor>) | null
Swift declaration
var 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 →