Represents a set of options for WebNN execution provider with MLContext.

When MLContext is provided, the deviceType is also required so that the WebNN EP can determine the preferred channel layout.

interface WebNNOptionsWithMLContext {
    context: unknown;
    deviceType: "cpu" | "gpu" | "npu";
    name: "webnn";
    numThreads?: number;
    powerPreference?: "default" | "high-performance" | "low-power";
}

Hierarchy (view full)

Properties

context: unknown
deviceType: "cpu" | "gpu" | "npu"
name: "webnn"
numThreads?: number
powerPreference?: "default" | "high-performance" | "low-power"

Generated using TypeDoc