Table of Contents

Method SetInference_UseDirectML

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.dll

SetInference_UseDirectML(IMaaOption<ResourceOption>?, int)

Sets inference execution provider and device.

public static bool SetInference_UseDirectML(this IMaaOption<ResourceOption>? opt, int deviceId = -1)

Parameters

opt IMaaOption<ResourceOption>?

The option.

deviceId int

The adapter id.

Returns

bool

true if the option was set successfully; otherwise, false.

Exceptions

ArgumentNullException

SetInference_UseDirectML(IMaaOption<ResourceOption>?, InferenceDevice)

Sets inference execution provider and device.

public static bool SetInference_UseDirectML(this IMaaOption<ResourceOption>? opt, InferenceDevice deviceId = InferenceDevice.Auto)

Parameters

opt IMaaOption<ResourceOption>?

The option.

deviceId InferenceDevice

The adapter id.

Returns

bool

true if the option was set successfully; otherwise, false.

Exceptions

ArgumentNullException