Contents

specialize(with:inputTypes:compilationDescriptor:)

Specialize the executable and optimize it.

Declaration

func specialize(with device: MPSGraphDevice?, inputTypes: [MPSGraphType], compilationDescriptor: MPSGraphCompilationDescriptor?)

Parameters

  • device:

    Optional MPSGraph device to compile with.

  • inputTypes:

    Input types expected to be passed to the executable.

  • compilationDescriptor:

    Compilation descriptor to be used to specialize, since the executable was created with a compilationDescriptor already this one overrides those settings to the extent it can.

Discussion

Use this method to choose when specialization happens, else it occurs at encode time automatically.