Class MPSKernelOptions
- java.lang.Object
-
- apple.metalperformanceshaders.enums.MPSKernelOptions
-
public final class MPSKernelOptions extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static longAllowReducedPrecisionWhen possible, MPSKernels use a higher precision data representation internally than the destination storage format to avoid excessive accumulation of computational rounding error in the result.static longDisableInternalTilingSome MPSKernels may automatically split up the work internally into multiple tiles.static longInsertDebugGroupsEnabling this bit will cause various -encode... methods to call MTLCommandEncoder push/popDebugGroup.static longNoneUse default optionsstatic longSkipAPIValidationMost MPS functions will sanity check their arguments.static longVerboseSome parts of MPS can provide debug commentary and tuning advice when run.
-
-
-
Field Detail
-
None
public static final long None
Use default options- See Also:
- Constant Field Values
-
SkipAPIValidation
public static final long SkipAPIValidation
Most MPS functions will sanity check their arguments. This has a small but non-zero CPU cost. Setting the MPSKernelOptionsSkipAPIValidation will skip these checks. MPSKernelOptionsSkipAPIValidation does not skip checks for memory allocation failure. Caution: turning on MPSKernelOptionsSkipAPIValidation can result in undefined behavior if the requested operation can not be completed for some reason. Most error states will be passed through to Metal which may do nothing or abort the program if Metal API validation is turned on.- See Also:
- Constant Field Values
-
AllowReducedPrecision
public static final long AllowReducedPrecision
When possible, MPSKernels use a higher precision data representation internally than the destination storage format to avoid excessive accumulation of computational rounding error in the result. MPSKernelOptionsAllowReducedPrecision advises the MPSKernel that the destination storage format already has too much precision for what is ultimately required downstream, and the MPSKernel may use reduced precision internally when it feels that a less precise result would yield better performance. The expected performance win is often small, perhaps 0-20%. When enabled, the precision of the result may vary by hardware and operating system.- See Also:
- Constant Field Values
-
DisableInternalTiling
public static final long DisableInternalTiling
Some MPSKernels may automatically split up the work internally into multiple tiles. This improves performance on larger textures and reduces the amount of memory needed by MPS for temporary storage. However, if you are using your own tiling scheme to achieve similar results, your tile sizes and MPS's choice of tile sizes may interfere with one another causing MPS to subdivide your tiles for its own use inefficiently. Pass MPSKernelOptionsDisableInternalTiling to force MPS to process your data tile as a single chunk.- See Also:
- Constant Field Values
-
InsertDebugGroups
public static final long InsertDebugGroups
Enabling this bit will cause various -encode... methods to call MTLCommandEncoder push/popDebugGroup. The debug string will be drawn from MPSKernel.label, if any or the name of the class otherwise.- See Also:
- Constant Field Values
-
Verbose
public static final long Verbose
Some parts of MPS can provide debug commentary and tuning advice when run. Setting this bit to 1 will cause the commentary to be emitted to stderr. Otherwise, the code is silent. This is especially useful for debugging MPSNNGraph. This option is on by default when the MPS_LOG_INFO environment variable is defined. For even more detailed output on a MPS object, you can use the po command in llvm with MPS objects: [@code] llvm> po[@endcode] - See Also:
- Constant Field Values
-
-