microsoft / microsoft/onnxruntime

[wasm runtime] Could not find an implementation for ArgMax(12) node with name 'ArgMax_1382'

Open
#9,760 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 8h
Merged PRs (30d)
179

Description

Is your feature request related to a problem? Please describe.
I've exported OpenAI's CLIP text encoder to ONNX with this command (as shown in this Colab notebook):

torch.onnx.export(model, text_tokens, "clip-text-vit-32.onnx", export_params=True, opset_version=12, do_constant_folding=True, input_names = ['input'], output_names = ['output'], dynamic_axes={'input' : {0 : 'batch_size'}, 'output' : {0 : 'batch_size'}})

You can see here: https://josephrocca.github.io/openai-clip-js/onnx-text-demo.html that it's throwing an error when trying to create a session (Could not find an implementation for ArgMax(12) node with name 'ArgMax_1382'). Just click that link, and then click the "start" button, and open the browser console to see the error.

Here's a direct link to the onnx file: https://huggingface.co/rocca/openai-clip-js/resolve/main/clip-text-vit-32-float32.onnx

I'm guessing this means that ArgMax is not yet supported by the wasm runtime?

System information

Describe the solution you'd like
Support for ArgMax, and the other operators in the above-mentioned onnx file, in case there are other operators that are also missing from the wasm runtime.

Describe alternatives you've considered
Not sure of any alternatives here.

Additional context
I've made a CLIP image encoding demo and it works fine. It was exported using the same command.

Here's the error stack (apologies for the screenshot - not sure how to copy-paste Chrome DevTools logs without it getting mangled):
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the linked ONNX Runtime Web demo and the provided CLIP text ONNX model, then inspect the browser-console error for ArgMax(12) and any subsequent missing operators. Done means the model can create a session and run in the WASM runtime without unsupported-operator errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, pytorch, wasm
Domain
machine-learning, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.