表示用于 WebNN 执行提供程序与 MLContext 的一组选项。

当提供 MLContext 时,deviceType 也是必需的,以便 WebNN EP 可以确定首选的通道布局。

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

层级 (查看全部)

属性

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

使用 TypeDoc 生成