Skip to content

Commit b35e9f5

Browse files
authored
[wasm] Update docs, add note about failing test. (#3855)
DOC
1 parent 3a2b6dd commit b35e9f5

7 files changed

+16
-10
lines changed

tfjs-backend-wasm/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ rollup.config.js
2020
tsconfig.json
2121
.yalc/
2222
yalc.lock
23+
*.png

tfjs-backend-wasm/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@ MobileNet is a medium-sized model with 3.48M params and ~300M multiply-adds.
127127
For this model, the WASM backend is between ~3X-11.5X faster than the plain
128128
JS backend, and ~5.3-7.7X slower than the WebGL backend.
129129

130-
<img src="./mobilenet-v2-bench.svg">
130+
<img src="./mobilenet-v2-bench.png">
131131

132132
| MobileNet inference (ms) | WASM | WebGL | Plain JS | WASM + SIMD | WASM + SIMD + threads
133133
|--------------------------|-------|-------|----------|-------------|----------------------
134134
| iPhone X | 147.1 | 20.3 | 941.3 | N/A | N/A |
135135
| iPhone XS | 140 | 18.1 | 426.4 | N/A | N/A |
136-
| Pixel 4 | 197.3 | 68.3 | 2228.2 | 142.4 | N/A |
137-
| Desktop Linux | 91.5 | 17.1 | 1049 | 61.9 | 30.0 |
136+
| Pixel 4 | 182 | 76.4 | 1628 | 82 | N/A |
137+
| ThinkPad X1 Gen6 w/Linux | 122.7 | 44.8 | 1489.4 | 34.6 | 12.4 |
138138
| Desktop Windows | 123.1 | 41.6 | 1117 | 37.2 | N/A |
139-
| Macbook Pro | 98.4 | 19.6 | 893.5 | 30.2 | 10.3 |
140-
139+
| Macbook Pro 15 2019 | 98.4 | 19.6 | 893.5 | 30.2 | 10.3 |
140+
| Node v.14 on Macbook Pro | 290 | N/A | 1404.3 | 64.2 | N/A |
141141

142142

143143
### Face Detector
@@ -147,13 +147,13 @@ the WASM backend is between ~8.2-19.8X faster than the plain JS backend and
147147
comparable to the WebGL backend (up to ~1.7X faster, or 2X slower, depending on
148148
the device).
149149

150-
<img src="./face-detector-bench.svg">
150+
<img src="./face-detector-bench.png">
151151

152152
| Face Detector inference (ms) | WASM | WebGL | Plain JS | WASM + SIMD | WASM + SIMD + threads
153153
|------------------------------|------|-------|----------|-------------|----------------------
154154
| iPhone X | 22.4 | 13.5 | 318 | N/A | N/A |
155155
| iPhone XS | 21.4 | 10.5 | 176.9 | N/A | N/A |
156-
| Pixel 4 | 32.2 | 30.6 | 478.8 | 24.0 | N/A |
156+
| Pixel 4 | 28 | 28 | 368 | 15.9 | N/A |
157157
| Desktop Linux | 12.6 | 12.7 | 249.5 | 8.0 | 6.2 |
158158
| Desktop Windows | 16.2 | 7.1 | 270.9 | 7.5 | N/A |
159159
| Macbook Pro 15 2019 | 13.6 | 22.7 | 209.1 | 7.9 | 4.0 |
160 KB
Loading

tfjs-backend-wasm/face-detector-bench.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
161 KB
Loading

tfjs-backend-wasm/mobilenet-v2-bench.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

tfjs-backend-wasm/src/setup_test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,14 @@ const TEST_FILTERS: TestFilter[] = [
224224
{include: 'oneHot'},
225225
{include: 'split'},
226226
{include: 'pad ', excludes: ['complex', 'zerosLike']},
227-
{include: 'clip', excludes: ['gradient', 'propagates NaNs']},
227+
{
228+
include: 'clip',
229+
excludes: [
230+
'gradient',
231+
'propagates NaNs' // clip delegates to XNNPACK which does not make
232+
// guarantees about behavior of nans.
233+
]
234+
},
228235
{include: 'addN'},
229236
{include: 'nonMaxSuppression'},
230237
{include: 'argmax', excludes: ['gradient']},

0 commit comments

Comments
 (0)