Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WebNN EP] Mark and fallback unsupported op for WebNN CPU backend #18472

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

Honry
Copy link
Contributor

@Honry Honry commented Nov 16, 2023

Current WebNN CPU (XNNPack) backend supports limit op list, fallbacks unsupported ops for WebNN "cpu" deviceType directly. This is a workaround because the op may be included in MLGraphBuilder for DirectML backend but without XNNPack implementation in Chromium.

@Honry
Copy link
Contributor Author

Honry commented Nov 16, 2023

@fdwr, @guschmue, PTAL, thanks! I need to rebase it once the PR #18411 is merged.

guschmue
guschmue previously approved these changes Nov 16, 2023
@guschmue
Copy link
Contributor

@Honry, maybe easiest for you to merge with main

@guschmue guschmue added the ep:WebNN WebNN execution provider label Nov 16, 2023
Current WebNN CPU (XNNPack) backend supports limit op list, fallbacks unsupported ops
for WebNN "cpu" deviceType directly. This is a workaround because the op may be included
in MLGraphBuilder for DirectML backend but without XNNPack implementation in Chromium.
@Honry
Copy link
Contributor Author

Honry commented Nov 17, 2023

Thanks @guschmue, rebase done.

fdwr
fdwr previously approved these changes Nov 17, 2023
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments could explain what's happening more clearly, but the code looks good 👍.

onnxruntime/core/providers/webnn/builders/helper.h Outdated Show resolved Hide resolved
onnxruntime/core/providers/webnn/builders/helper.h Outdated Show resolved Hide resolved
@guschmue
Copy link
Contributor

/azp run ONNX Runtime Web CI Pipeline

@guschmue
Copy link
Contributor

/azp run Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,Windows ARM64 QNN CI Pipeline,Windows CPU CI Pipeline

@guschmue
Copy link
Contributor

/azp run Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline,onnxruntime-binary-size-checks-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,Windows x64 QNN CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

Azure Pipelines successfully started running 7 pipeline(s).

Copy link

Azure Pipelines successfully started running 9 pipeline(s).

fdwr
fdwr previously approved these changes Nov 18, 2023
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the added comments (the picky linter is complaining about 2 spaces).

@Honry
Copy link
Contributor Author

Honry commented Nov 19, 2023

Thanks for the added comments (the picky linter is complaining about 2 spaces).

Fixed.

@guschmue
Copy link
Contributor

/azp run ONNX Runtime Web CI Pipeline

@guschmue
Copy link
Contributor

/azp run Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,Windows ARM64 QNN CI Pipeline,Windows CPU CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@guschmue
Copy link
Contributor

/azp run Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline,onnxruntime-binary-size-checks-ci-pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,Windows x64 QNN CI Pipeline

Copy link

Azure Pipelines successfully started running 9 pipeline(s).

Copy link

Azure Pipelines successfully started running 7 pipeline(s).

@guschmue guschmue merged commit 89723c8 into microsoft:main Nov 22, 2023
63 checks passed
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
…crosoft#18472)

Current WebNN CPU (XNNPack) backend supports limit op list, fallbacks
unsupported ops for WebNN "cpu" deviceType directly. This is a
workaround because the op may be included in MLGraphBuilder for DirectML
backend but without XNNPack implementation in Chromium.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:WebNN WebNN execution provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants