intel / webml-polyfill

Deprecated, the Web Neural Network Polyfill project has been moved to https://github.com/webmachinelearning/webnn-polyfill
Apache License 2.0
160 stars 42 forks source link

[WebGL2] An error occurs for AVERAGE_POOL_2D operation with WebGL2 backend on Android #271

Closed Christywl closed 5 years ago

Christywl commented 5 years ago

Test Env: Chromium Version: nightly build 70.0.3503.0 (b7ce158) Platform: Android Goolge Pixel 2(8.1.0)

Expected Result: The test should pass.

Actual Result: An error occurs for AVERAGE_POOL_2D operation with WebGL2 backend.

Uncaught (in promise) Error: [Tensor] Tensor shape[1] 10000 > MAX_TEXTURE_SIZE 4096
    at Tensor.createGLTexture (webml-polyfill.js:884)
    at AveragePool2D._createIndexMap (webml-polyfill.js:8881)
    at AveragePool2D.call (webml-polyfill.js:8896)
    at webml-polyfill.js:8201
    at Array.forEach (<anonymous>)
    at webml-polyfill.js:8163
    at new Promise (<anonymous>)
    at Model._execute (webml-polyfill.js:8155)
    at webml-polyfill.js:8119
    at Model.execute (webml-polyfill.js:8134)

avg_pool_2d

How to Reproduce:

  1. Launch chromium and disable WebML flag
  2. Visit https://brucedai.github.io/nt/test/avg_pool_2d.html?backend=webgl2

    • check result for Avg pool float example/2
    • check result for Avg pool float example/4

Similar issue: #182

GreyZzzzzzXh commented 5 years ago

This bug has been fixed by replacing webgl2 with tfjs-core (PR #297).

Christywl commented 5 years ago

This issue can't reproduce on webgl backend on Android nightly build 6540a81.