Open gianlourbano opened 1 week ago
For WebGPU EP, the problem is related to op unsqueeze. According the ONNX spec (https://onnx.ai/onnx/operators/onnx__Unsqueeze.html), axes of unsqueeze is a list of integers, but in your model, it's just a scalar "1".
So the problem is related to the dynamo export of torch?
Technically the axes should always be a 1D tensor. However, in reality, the CPU code has loosen the limit:
perhaps webgpu should have same behavior to CPU.
Describe the issue
I converted the model from pytorch to onnx as described here, with some issues. The model works in onnx python, but in wasm /webgpu the runtime dies without error. The optimized version of the model runs in wasm, but not webgpu. I don't know if this problem is related to the model conversion or the runtime. I have tested with both @latest and @dev.
To reproduce
Here's a link to a sample repo, instructions in README.
Urgency
Urgent, as this project is related to my thesis
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.19.2, 1.20.0-dev.20240907-ad9afbb042
Execution Provider
'wasm'/'cpu' (WebAssembly CPU), 'webgpu' (WebGPU)