microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
13.45k stars 2.75k forks source link

[Web] `Error: using ceil() in shape computation is not yet supported for AveragePool` #21206

Open xenova opened 4 days ago

xenova commented 4 days ago

Describe the issue

When attempting to run https://huggingface.co/onnx-community/rtdetr_r50vd on WebGPU, I receive the following error: image

To reproduce

JSFiddle: https://jsfiddle.net/j8uc3k91/

const url = 'https://huggingface.co/onnx-community/rtdetr_r18vd_coco_o365/resolve/main/onnx/model.onnx?download=true';
const session = await ort.InferenceSession.create(url, {
  executionProviders: ['webgpu'],
});

const dims = [1, 3, 640, 640];
const input = new ort.Tensor(
  'float32',
  new Float32Array(dims.reduce((acc, x) => acc * x, 1)),
  dims,
)

// prepare feeds. use model input names as keys.
const feeds = { pixel_values: input };

// feed inputs and run
const results = await session.run(feeds);
console.log(results)

Urgency

Blocks RT-DETR use in Transformers.js w/ WebGPU

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.18.0

Execution Provider

'webgpu' (WebGPU)

xenova commented 4 days ago

cc @guschmue @fs-eire

guschmue commented 1 day ago

ok, we'll fix this. I think there is another issue on this too.