Contents

deviceUsage(for:)

Returns the anticipated compute devices that would be used for executing a MLProgram operation.

Declaration

func deviceUsage(for operation: MLModelStructure.Program.Operation) -> MLComputePlan.DeviceUsage?

Parameters

  • operation:

    A MLProgram operation

Return Value

The anticipated compute devices that would be used for executing the layer or nil if the usage couldn’t be determined.

See Also

Getting the device usage