interface WebGpuExecutionProviderOption {
    device?: unknown;
    forceCpuNodeNames?: readonly string[];
    name: "webgpu";
    preferredLayout?: "NHWC" | "NCHW";
    validationMode?: "basic" | "disabled" | "full" | "wgpuOnly";
}

Hierarchy (view full)

Properties

device?: unknown

Specify an optional WebGPU device to be used by the WebGPU execution provider.

forceCpuNodeNames?: readonly string[]

Specify a list of node names that should be executed on CPU even when WebGPU EP is used.

name: "webgpu"
preferredLayout?: "NHWC" | "NCHW"

Specify the preferred layout when running layout sensitive operators.

Default

'NCHW'
validationMode?: "basic" | "disabled" | "full" | "wgpuOnly"

Specify the validation mode for WebGPU execution provider.

  • 'disabled': Disable all validation. When used in Node.js, disable validation may cause process crash if WebGPU errors occur. Be cautious when using this mode. When used in web, this mode is equivalent to 'wgpuOnly'.
  • 'wgpuOnly': Perform WebGPU internal validation only.
  • 'basic': Perform basic validation including WebGPU internal validation. This is the default mode.
  • 'full': Perform full validation. This mode may have performance impact. Use it for debugging purpose.

Default

'basic'

Generated using TypeDoc