Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

[WASM] Some examples don't work on Android WASM #441

Open
Christywl opened this issue Jan 10, 2019 · 5 comments
Open

[WASM] Some examples don't work on Android WASM #441

Christywl opened this issue Jan 10, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Christywl
Copy link
Contributor

Test Env:
Chromium Version: nightly build 70.0.3503.0 (8755e6b)
Platform: Android 8.1.0(Google Pixel 2)

Expected Result:
The examples work on Android WASM.

Actual Result:
The following examples don't work on Android WASM:

  • Inception V4(TFlite)
  • Incep. Res. V2(TFlite)
  • ResNet50 v2(Onnx)
  • DenseNet(Onnx)
    inception v4 tflite
    densenet onnx

How to Reproduce:
1.Get the latest codes(1952226): git clone https://github.com/intel/webml-polyfill, and run npm install and npm run build
2. Download the example models according to https://github.com/intel/webml-polyfill/tree/master/examples/image_classification/model
3. Run: npm start
4. Visit http://127.0.0.1:8080/examples/image_classification/index.html
5. Switch to WASM backend and select the example:

  • Inception V4(TFlite)
  • Incep. Res. V2(TFlite)
  • ResNet50 v2(Onnx)
  • DenseNet(Onnx)
@ibelem ibelem added the bug Something isn't working label Jan 10, 2019
@Wenzhao-Xiang
Copy link
Contributor

After build WASM with -s ASSERTIONS=2, found these two errors come from one same problem that the model is too large and allocating memory fails when initializing.
256M memory is not enough for these four models. Therefore, wasm will use Memory.grow() to allocate another 256M memory(Memory * 2) for use.
Seems sometimes this allocating operation will fail in Android.
That's the root cause.

After restart chrome, these models work again.

@Christywl
Copy link
Contributor Author

This issue can't reproduce with webml-polyfill commit 466f88a.

@pinzhenx
Copy link
Contributor

These four models still failed in WASM on Android 9

@Christywl
Copy link
Contributor Author

Christywl commented Feb 27, 2019

This issue still happens for example and benchmark on Android, so reopen it.

@Christywl Christywl reopened this Feb 27, 2019
@liyananxl
Copy link

Samsung S9(Android 8, Chrome Stable Version: 76.0.3809.89) can reproduce this bug on Inception V4(TFlite) and ResNet50 v2(Onnx).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants