Skip to content

Add oneDNN/XNNPACK backend and support MobileNet/SqueezeNet model#10

Merged
huningxin merged 2 commits intowebmachinelearning:mainfrom
fujunwei:first_wave_models
Jun 15, 2021
Merged

Add oneDNN/XNNPACK backend and support MobileNet/SqueezeNet model#10
huningxin merged 2 commits intowebmachinelearning:mainfrom
fujunwei:first_wave_models

Conversation

@fujunwei
Copy link
Collaborator

@fujunwei fujunwei commented Jun 2, 2021

The commit supports 5 first-wave ops required by MobileNet/SequeezeNet example including Clamp, batchNormalization, LeakyRelu, Concat and Gemm.

It also adds XNNPACK and oneDNN backends that is mainly for the investigation of WebNN Operation Level Execution
use case. So only a limited set of tests (such as of conv2d) is expected to pass.

It also adds experimental sync build and compute API to implement TF.js Wasm backend by WebNN API.

@fujunwei fujunwei requested a review from huningxin June 2, 2021 06:48
Copy link
Collaborator

@huningxin huningxin left a comment

Choose a reason for hiding this comment

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

Great work. Thanks much @fujunwei . The implementation would help the group for spec discussions, in particular for recent wasm op-level execution webmachinelearning/webnn#156.

I left some comments for clarity. Please take a look.

The commit supports 5 first-wave ops required by MobileNet/SequeezeNet example
including Clamp, batchNormalization, LeakyRelu, Concat and Gemm.

It also adds XNNPACK and oneDNN backends that is mainly for the investigation
of WebNN Operation Level Execution use case and adds experimental sync build and
compute API to implement TF.js Wasm backend by WebNN API.
@fujunwei fujunwei force-pushed the first_wave_models branch from c2cc549 to 3669bb7 Compare June 3, 2021 05:28
@fujunwei
Copy link
Collaborator Author

fujunwei commented Jun 3, 2021

Thanks, done. Please take a look again.

@fujunwei fujunwei force-pushed the first_wave_models branch from 08470ed to 92ac8eb Compare June 8, 2021 02:12
@BruceDai
Copy link
Collaborator

BruceDai commented Jun 8, 2021

Thanks much @fujunwei!

I tested with this PR by both DML backend and OpenVINO backend, here's tests and examples PASS status table as following:

Backend End2EndTests (Pass / Total) LeNet Example SqueezeNet1.1 nchw Example SqueezeNet1.0 nhwc Example MobileNetV2 nchw Example MobileNetV2 nhwc Example
DML 148 / 148
OpenVINO 146 / 148

And two MaxPool2d tests with dilations options (Pool2dTests.MaxPool2dDilationsDefault, Pool2dTests.MaxPool2dDilationsNhwc) failed when running OpenVINO backend. @fujunwei PTAL, thanks.

Copy link
Collaborator

@huningxin huningxin left a comment

Choose a reason for hiding this comment

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

LGTM with a nit. Thanks @fujunwei for contributing this PR and @BruceDai for testing.

@fujunwei fujunwei force-pushed the first_wave_models branch from 92ac8eb to 542f182 Compare June 8, 2021 06:57
@fujunwei
Copy link
Collaborator Author

fujunwei commented Jun 8, 2021

Thanks @BruceDai, current OpenVINO doesn't support dilated pooling, and only MaxPooling support dilation in DML. I filed a issue-180 to discuss if it should be defined in WebNN Spec.

@BruceDai
Copy link
Collaborator

BruceDai commented Jun 8, 2021

Thanks much @fujunwei for kindly explanation!

@huningxin
Copy link
Collaborator

It also adds XNNPACK and oneDNN backends that is mainly for the investigation of WebNN Operation Level Execution use case. So only a limited set of tests (such as of conv2d) is expected to pass.

It also adds experimental sync build and compute API to implement TF.js Wasm backend by WebNN API.

Given the PR of sync API was merged and the investigation of wasm op-level execution was done, I am proposing to merge this PR to allow participants to reproduce the results. And it would also unblock the development for #6 and #12 .

Any objections? @anssiko @wchao1115 @pyu10055

@anssiko
Copy link
Member

anssiko commented Jun 11, 2021

SGTM!

@huningxin huningxin merged commit 6e14ebe into webmachinelearning:main Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants