tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Running benchmark tests with wasm (SIMD + multiThread) backend should fail by Chrome browser not enabling "SharedArrayBuffer" features.

Open BruceDai opened this issue 3 years ago • 0 comments

Please make sure that this is a bug. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:bug_template

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Win10
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: NA
  • TensorFlow.js installed from (npm or script link):
  • TensorFlow.js version (use command below): 3.19.0
  • Browser version: 104.0.5112.81
  • Tensorflow.js Converter Version: 3.19.0

Describe the current behavior Test model information and result are showed on the page, while such error messages "Initialization of backend wasm failed" and "ReferenceError: SharedArrayBuffer is not defined" output in Console. On this condition, this result isn't trustable.

Describe the expected behavior Above error messages should explicitly alert on the page for users, and current benchmark test should not be executed.

Standalone code to reproduce the issue Provide a reproducible test case that is the bare minimum necessary to generate the problem. If possible, please share a link to Colab/CodePen/any notebook.

Steps: Launch Chrome browser (without enabling "SharedArrayBuffer" features), then visit to https://tensorflow.github.io/tfjs/e2e/benchmarks/local-benchmark/index.html, select wasm backend on top right Controls, enable wasm multithread, click Run benchmark.

Other info / logs Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Run benchmark tests with wasm (SIMD + multiThread) backend successfully by Chrome browser enabled "SharedArrayBuffer" features.

@lina128 PTAL, thanks.

BruceDai avatar Aug 16 '22 03:08 BruceDai