Skip to content

[WebGPU] Access violation when initializing the WebGPU context #26010

@shiyi9801

Description

@shiyi9801

This issue happens in WebNN ORT WebGPU EP.

reproduce steps

  1. Download the latest chrome canary
  2. Put the ORT dlls built with WebGPU (onnxruntime.dll, onnxruntime_providers_shared.dll) under "C:\Program Files\ORT" (dxcompiler.dll and dxil.dll are not required because they are packed into chrome)
  3. start the browser .\chrome.exe --enable-features=WebMachineLearningNeuralNetwork,WebNNOnnxRuntime --allow-third-party-modules --webnn-ort-library-path-for-testing="C:\Program Files\ORT" --webnn-ort-ep-library-path-for-testing=fakepath --webnn-ort-logging-level=VERBOSE
  4. navigate to https://webmachinelearning.github.io/webnn-samples/image_classification/
  5. Select WebNN (GPU) Float32 MobileNet V2, the test should run successfully
  6. Refresh the page, repeat step 5, the process will crash. Navigate to chrome://gpu and scroll down to the bottom, you can see the logs GpuProcessHost: The GPU process crashed! Exit code: STATUS_ACCESS_VIOLATION.

debugging
From my debugging, it looks like the access violation is caused by accessing a null dawn::native::InstanceBase*.
Image

You can put the pdbs along with the ORT dlls and attach to the chrome GPU process if you want to debug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:WebGPUort-web webgpu providerep:WebNNWebNN execution providerplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions