diff --git a/tfjs-backend-wasm/README.md b/tfjs-backend-wasm/README.md index 37f77d26253..7ffe60ae636 100644 --- a/tfjs-backend-wasm/README.md +++ b/tfjs-backend-wasm/README.md @@ -98,28 +98,31 @@ CPU backend, and ~5.3-7.7X slower than the WebGL backend. | MobileNet inference (ms) | WASM | WebGL | CPU | -|-------------------|-------|-------|-------| -| iPhone X | 147.1 | 20.3 | 941.3 | -| iPhone XS | 140 | 18.1 | 426.4 | -| Desktop Linux | 91.5 | 17.1 | 1049 | -| Macbook Pro | | | | +|--------------------------|-------|-------|-------| +| iPhone X | 147.1 | 20.3 | 941.3 | +| iPhone XS | 140 | 18.1 | 426.4 | +| Pixel 3 | 266.2 | 77.3 | 2345.2| +| Desktop Linux | 91.5 | 17.1 | 1049 | +| Macbook Pro | 98.4 | 19.6 | 893.5 | ### Face Detector Face detector is a lite model with 0.1M params and ~20M multiply-adds. For this model, -the WASM backend is between ~8.2-19.8X faster than the vanilla CPU backend, and -only 1X-1.7X slower than the WebGL backend. +the WASM backend is between ~8.2-19.8X faster than the vanilla CPU backend and +comparable to the WebGL backend (up to ~1.7X faster, or 2X slower, depending on +the device). | Face Detector inference (ms) | WASM | WebGL | CPU | -|---------------|------|-------|-------| -| iPhone X | 23 | 13.5 | 318 | -| iPhone XS | 21.4 | 10.5 | 176.9 | -| Desktop Linux | 12.6 | 12.7 | 249.5 | -| Macbook Pro | | | | +|------------------------------|------|-------|-------| +| iPhone X | 22.4 | 13.5 | 318 | +| iPhone XS | 21.4 | 10.5 | 176.9 | +| Pixel 3 | 40.7 | 31.8 | 535.2 | +| Desktop Linux | 12.6 | 12.7 | 249.5 | +| Macbook Pro 15 2019 | 13.6 | 22.7 | 209.1 | # FAQ diff --git a/tfjs-backend-wasm/face-detector-bench.svg b/tfjs-backend-wasm/face-detector-bench.svg index 8e9878468d7..76b8cac229d 100644 --- a/tfjs-backend-wasm/face-detector-bench.svg +++ b/tfjs-backend-wasm/face-detector-bench.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tfjs-backend-wasm/mobilenet-v2-bench.svg b/tfjs-backend-wasm/mobilenet-v2-bench.svg index cf8a6905a54..ee76f97d41e 100644 --- a/tfjs-backend-wasm/mobilenet-v2-bench.svg +++ b/tfjs-backend-wasm/mobilenet-v2-bench.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/tfjs-core/benchmarks/index.html b/tfjs-core/benchmarks/index.html index 8b98c0e5b4d..5211d63b771 100644 --- a/tfjs-core/benchmarks/index.html +++ b/tfjs-core/benchmarks/index.html @@ -338,7 +338,7 @@

TensorFlow.js Model Benchmark

await sleep(200); await measureAveragePredictTime(); await sleep(200); - if (queryTimerIsEnabled()) { + if (state.backend != 'webgl' || queryTimerIsEnabled()) { await profileKernelTime(); } else { showMsg('Skipping kernel times since query timer extension is not ' +