oidn-web 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/README.md +140 -4
- package/benchmarks/compare.mjs +651 -0
- package/benchmarks/leak.mjs +255 -0
- package/benchmarks/results/before-spatial.json +391 -0
- package/benchmarks/results/before-spatial.md +47 -0
- package/benchmarks/results/int8-scan.json +2007 -0
- package/benchmarks/results/int8-scan.md +160 -0
- package/benchmarks/results/int8-w8a8-scan.json +2007 -0
- package/benchmarks/results/int8-w8a8-scan.md +160 -0
- package/benchmarks/results/int8-weight-channel.json +1413 -0
- package/benchmarks/results/int8-weight-channel.md +118 -0
- package/benchmarks/results/int8-weight-only.json +1437 -0
- package/benchmarks/results/int8-weight-only.md +118 -0
- package/benchmarks/results/kernel-webnn-final.json +1115 -0
- package/benchmarks/results/kernel-webnn-final.md +104 -0
- package/benchmarks/results/latest-optimized.json +375 -0
- package/benchmarks/results/latest-optimized.md +47 -0
- package/benchmarks/results/latest.json +391 -0
- package/benchmarks/results/latest.md +47 -0
- package/benchmarks/results/profile-baseline.json +331 -0
- package/benchmarks/results/profile-baseline.md +12 -0
- package/benchmarks/results/profile-conv2x.json +331 -0
- package/benchmarks/results/profile-conv2x.md +12 -0
- package/benchmarks/results/profile-fast-init.json +385 -0
- package/benchmarks/results/profile-fast-init.md +47 -0
- package/benchmarks/results/profile-fp16-fma.json +369 -0
- package/benchmarks/results/profile-fp16-fma.md +47 -0
- package/benchmarks/results/profile-fp16-tiled-decoder.json +369 -0
- package/benchmarks/results/profile-fp16-tiled-decoder.md +47 -0
- package/benchmarks/results/profile-fp16-tiled-encoder.json +369 -0
- package/benchmarks/results/profile-fp16-tiled-encoder.md +47 -0
- package/benchmarks/results/profile-fp16-unfused-pool.json +385 -0
- package/benchmarks/results/profile-fp16-unfused-pool.md +47 -0
- package/benchmarks/results/profile-input-major.json +347 -0
- package/benchmarks/results/profile-input-major.md +12 -0
- package/benchmarks/results/profile-k16.json +347 -0
- package/benchmarks/results/profile-k16.md +12 -0
- package/benchmarks/results/profile-k4.json +347 -0
- package/benchmarks/results/profile-k4.md +12 -0
- package/benchmarks/results/profile-pool-reuse.json +331 -0
- package/benchmarks/results/profile-pool-reuse.md +12 -0
- package/benchmarks/results/profile-precompiled.json +385 -0
- package/benchmarks/results/profile-precompiled.md +47 -0
- package/benchmarks/results/profile-static-channels.json +385 -0
- package/benchmarks/results/profile-static-channels.md +47 -0
- package/benchmarks/results/profile-static-io.json +385 -0
- package/benchmarks/results/profile-static-io.md +47 -0
- package/benchmarks/results/profile-tiled-conv.json +331 -0
- package/benchmarks/results/profile-tiled-conv.md +12 -0
- package/benchmarks/results/profile-tiled-decoder.json +347 -0
- package/benchmarks/results/profile-tiled-decoder.md +12 -0
- package/benchmarks/results/profile-tiled-matmul.json +331 -0
- package/benchmarks/results/profile-tiled-matmul.md +12 -0
- package/benchmarks/results/profile-unfused-decoder.json +379 -0
- package/benchmarks/results/profile-unfused-decoder.md +12 -0
- package/benchmarks/results/profile-unfused-pool.json +347 -0
- package/benchmarks/results/profile-unfused-pool.md +12 -0
- package/benchmarks/results/spatial-auto.json +575 -0
- package/benchmarks/results/spatial-auto.md +61 -0
- package/benchmarks/results/subgroup-smoke.json +1094 -0
- package/benchmarks/results/subgroup-smoke.md +104 -0
- package/benchmarks/results/webnn-smoke.json +739 -0
- package/benchmarks/results/webnn-smoke.md +76 -0
- package/dist/oidn.js +4189 -22603
- package/dist/oidn.umd.cjs +784 -5807
- package/lib/UNet.d.ts +66 -15
- package/lib/UNet.js +162 -257
- package/lib/UNet.js.map +1 -1
- package/lib/WGPUComputePass.d.ts +1 -1
- package/lib/WGPUComputePass.js +6 -4
- package/lib/WGPUComputePass.js.map +1 -1
- package/lib/backend.d.ts +8 -4
- package/lib/backend.js +36 -44
- package/lib/backend.js.map +1 -1
- package/lib/graphOptimizer.d.ts +54 -0
- package/lib/graphOptimizer.js +216 -0
- package/lib/graphOptimizer.js.map +1 -0
- package/lib/main.d.ts +33 -10
- package/lib/main.js +5 -0
- package/lib/main.js.map +1 -1
- package/lib/modelSpec.d.ts +80 -0
- package/lib/modelSpec.js +270 -0
- package/lib/modelSpec.js.map +1 -0
- package/lib/nativeUNet.d.ts +67 -0
- package/lib/nativeUNet.js +1735 -0
- package/lib/nativeUNet.js.map +1 -0
- package/lib/process.js +38 -35
- package/lib/process.js.map +1 -1
- package/lib/resourceTracker.d.ts +26 -0
- package/lib/resourceTracker.js +65 -0
- package/lib/resourceTracker.js.map +1 -0
- package/lib/tileScheduler.d.ts +33 -0
- package/lib/tileScheduler.js +86 -0
- package/lib/tileScheduler.js.map +1 -0
- package/lib/webnnUNet.d.ts +52 -0
- package/lib/webnnUNet.js +535 -0
- package/lib/webnnUNet.js.map +1 -0
- package/package.json +9 -5
- package/scripts/inspect-model.mjs +64 -0
- package/src/UNet.ts +236 -339
- package/src/WGPUComputePass.ts +6 -4
- package/src/backend.ts +42 -55
- package/src/graphOptimizer.ts +301 -0
- package/src/main.ts +71 -11
- package/src/modelSpec.ts +414 -0
- package/src/nativeUNet.ts +2256 -0
- package/src/process.ts +38 -36
- package/src/resourceTracker.ts +94 -0
- package/src/tileScheduler.ts +138 -0
- package/src/webnnUNet.ts +812 -0
- package/tests/modelSpec.test.mjs +128 -0
- package/tests/resourceLifecycle.test.mjs +383 -0
- package/tests/tileScheduler.test.mjs +90 -0
- package/lib/helper.d.ts +0 -4
- package/lib/helper.js +0 -33
- package/lib/helper.js.map +0 -1
- package/lib/kernels.d.ts +0 -1
- package/lib/kernels.js +0 -26
- package/lib/kernels.js.map +0 -1
- package/src/helper.ts +0 -43
- package/src/kernels.ts +0 -31
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generatedAt": "2026-08-20T04:13:39.756Z",
|
|
3
|
+
"currentCommit": "5d9c1c8771e2a03c90bfadafec4b5dd28fada446",
|
|
4
|
+
"baselineCommit": "136c00c34aa5cf4561b4137034dbd643177f0a5f",
|
|
5
|
+
"settings": {
|
|
6
|
+
"width": 512,
|
|
7
|
+
"height": 512,
|
|
8
|
+
"tileSize": 512,
|
|
9
|
+
"warmup": 1,
|
|
10
|
+
"runs": 3,
|
|
11
|
+
"model": "rt_hdr_calb_cnrm_large.tza",
|
|
12
|
+
"gpuQueueCompletionIncluded": true
|
|
13
|
+
},
|
|
14
|
+
"browser": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
|
15
|
+
"adapter": {
|
|
16
|
+
"vendor": "apple",
|
|
17
|
+
"architecture": "metal-3",
|
|
18
|
+
"device": "",
|
|
19
|
+
"description": ""
|
|
20
|
+
},
|
|
21
|
+
"results": [
|
|
22
|
+
{
|
|
23
|
+
"label": "TFJS (136c00c)",
|
|
24
|
+
"bundle": "baseline",
|
|
25
|
+
"baseline": true,
|
|
26
|
+
"initializationMs": 8.700000002980232,
|
|
27
|
+
"timesMs": [
|
|
28
|
+
35.29999999701977,
|
|
29
|
+
34.79999999701977,
|
|
30
|
+
34.70000000298023
|
|
31
|
+
],
|
|
32
|
+
"supportsFP16": true,
|
|
33
|
+
"adapter": {
|
|
34
|
+
"vendor": "apple",
|
|
35
|
+
"architecture": "metal-3",
|
|
36
|
+
"device": "",
|
|
37
|
+
"description": ""
|
|
38
|
+
},
|
|
39
|
+
"summary": {
|
|
40
|
+
"minMs": 34.70000000298023,
|
|
41
|
+
"medianMs": 34.79999999701977,
|
|
42
|
+
"meanMs": 34.93333333233992,
|
|
43
|
+
"p95Ms": 35.29999999701977,
|
|
44
|
+
"maxMs": 35.29999999701977
|
|
45
|
+
},
|
|
46
|
+
"messages": []
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "WGSL FP32",
|
|
50
|
+
"bundle": "current",
|
|
51
|
+
"baseline": false,
|
|
52
|
+
"precision": "fp32",
|
|
53
|
+
"initializationMs": 37.900000005960464,
|
|
54
|
+
"timesMs": [
|
|
55
|
+
35.899999998509884,
|
|
56
|
+
35.79999999701977,
|
|
57
|
+
35.80000000447035
|
|
58
|
+
],
|
|
59
|
+
"executionProfile": {
|
|
60
|
+
"totalMs": 35.491794999999996,
|
|
61
|
+
"layers": [
|
|
62
|
+
{
|
|
63
|
+
"id": "input-pack",
|
|
64
|
+
"durationMs": 0.050704
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "enc_conv1a",
|
|
68
|
+
"durationMs": 0.839743
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "enc_conv1b",
|
|
72
|
+
"durationMs": 3.786178
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "pool1",
|
|
76
|
+
"durationMs": 0.415415
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "enc_conv2a",
|
|
80
|
+
"durationMs": 1.404142
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "enc_conv2b",
|
|
84
|
+
"durationMs": 2.268341
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "pool2",
|
|
88
|
+
"durationMs": 0.054578
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "enc_conv3a",
|
|
92
|
+
"durationMs": 0.766001
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "enc_conv3b",
|
|
96
|
+
"durationMs": 0.989602
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "pool3",
|
|
100
|
+
"durationMs": 0.01804
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "enc_conv4a",
|
|
104
|
+
"durationMs": 0.524902
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "enc_conv4b",
|
|
108
|
+
"durationMs": 0.611144
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "pool4",
|
|
112
|
+
"durationMs": 0.008834
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "enc_conv5a",
|
|
116
|
+
"durationMs": 0.259057
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "enc_conv5b",
|
|
120
|
+
"durationMs": 0.335089
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "dec_conv4a",
|
|
124
|
+
"durationMs": 1.248242
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "dec_conv4b",
|
|
128
|
+
"durationMs": 0.610268
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "dec_conv3a",
|
|
132
|
+
"durationMs": 2.48711
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "dec_conv3b",
|
|
136
|
+
"durationMs": 0.990102
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "dec_conv2a",
|
|
140
|
+
"durationMs": 4.369117
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "dec_conv2b",
|
|
144
|
+
"durationMs": 2.294795
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "dec_conv1a",
|
|
148
|
+
"durationMs": 6.910012
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "dec_conv1b",
|
|
152
|
+
"durationMs": 3.753974
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": "dec_conv1c",
|
|
156
|
+
"durationMs": 0.496405
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"runtimeInfo": {
|
|
161
|
+
"configuredEngine": "wgsl",
|
|
162
|
+
"gpuEngine": "wgsl",
|
|
163
|
+
"precision": "fp32",
|
|
164
|
+
"model": "oidn-unet-large-v1",
|
|
165
|
+
"modelFamily": "oidn-unet-large",
|
|
166
|
+
"inputChannels": 9,
|
|
167
|
+
"dynamicTile": {
|
|
168
|
+
"enabled": false,
|
|
169
|
+
"currentTileSize": 512,
|
|
170
|
+
"minTileSize": 256,
|
|
171
|
+
"maxTileSize": 512,
|
|
172
|
+
"targetTileTimeMs": 16
|
|
173
|
+
},
|
|
174
|
+
"lastExecution": {
|
|
175
|
+
"width": 512,
|
|
176
|
+
"height": 512,
|
|
177
|
+
"tileWidth": 512,
|
|
178
|
+
"tileHeight": 512,
|
|
179
|
+
"tileCount": 1,
|
|
180
|
+
"durationMs": 37.19999999552965,
|
|
181
|
+
"tileTimeMs": {
|
|
182
|
+
"min": 37.19999999552965,
|
|
183
|
+
"median": 37.19999999552965,
|
|
184
|
+
"mean": 37.19999999552965,
|
|
185
|
+
"max": 37.19999999552965
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"supportsFP16": true,
|
|
190
|
+
"adapter": {
|
|
191
|
+
"vendor": "apple",
|
|
192
|
+
"architecture": "metal-3",
|
|
193
|
+
"device": "",
|
|
194
|
+
"description": ""
|
|
195
|
+
},
|
|
196
|
+
"summary": {
|
|
197
|
+
"minMs": 35.79999999701977,
|
|
198
|
+
"medianMs": 35.80000000447035,
|
|
199
|
+
"meanMs": 35.833333333333336,
|
|
200
|
+
"p95Ms": 35.899999998509884,
|
|
201
|
+
"maxMs": 35.899999998509884
|
|
202
|
+
},
|
|
203
|
+
"messages": [],
|
|
204
|
+
"validation": {
|
|
205
|
+
"sampleCount": 6144,
|
|
206
|
+
"meanAbsoluteError": 0.0000011096847932397698,
|
|
207
|
+
"rootMeanSquaredError": 0.0000018071588418628667,
|
|
208
|
+
"maxAbsoluteError": 0.000013589859008789062,
|
|
209
|
+
"passed": true,
|
|
210
|
+
"thresholds": {
|
|
211
|
+
"maxMeanError": 0.0001,
|
|
212
|
+
"maxAbsoluteError": 0.001
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"label": "WGSL FP16",
|
|
218
|
+
"bundle": "current",
|
|
219
|
+
"baseline": false,
|
|
220
|
+
"precision": "fp16",
|
|
221
|
+
"initializationMs": 30.100000001490116,
|
|
222
|
+
"timesMs": [
|
|
223
|
+
27.700000002980232,
|
|
224
|
+
27.599999994039536,
|
|
225
|
+
27.700000002980232
|
|
226
|
+
],
|
|
227
|
+
"executionProfile": {
|
|
228
|
+
"totalMs": 26.970954000000003,
|
|
229
|
+
"layers": [
|
|
230
|
+
{
|
|
231
|
+
"id": "input-pack",
|
|
232
|
+
"durationMs": 0.044871
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "enc_conv1a",
|
|
236
|
+
"durationMs": 0.618309
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "enc_conv1b",
|
|
240
|
+
"durationMs": 3.203075
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "pool1",
|
|
244
|
+
"durationMs": 0.339255
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "enc_conv2a",
|
|
248
|
+
"durationMs": 1.164668
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"id": "enc_conv2b",
|
|
252
|
+
"durationMs": 1.999828
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "pool2",
|
|
256
|
+
"durationMs": 0.050329
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "enc_conv3a",
|
|
260
|
+
"durationMs": 0.675637
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"id": "enc_conv3b",
|
|
264
|
+
"durationMs": 0.84091
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "pool3",
|
|
268
|
+
"durationMs": 0.019539
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "enc_conv4a",
|
|
272
|
+
"durationMs": 0.340588
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"id": "enc_conv4b",
|
|
276
|
+
"durationMs": 0.530193
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"id": "pool4",
|
|
280
|
+
"durationMs": 0.011499
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"id": "enc_conv5a",
|
|
284
|
+
"durationMs": 0.183898
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"id": "enc_conv5b",
|
|
288
|
+
"durationMs": 0.233393
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"id": "dec_conv4a",
|
|
292
|
+
"durationMs": 0.951814
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "dec_conv4b",
|
|
296
|
+
"durationMs": 0.533193
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"id": "dec_conv3a",
|
|
300
|
+
"durationMs": 1.699276
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "dec_conv3b",
|
|
304
|
+
"durationMs": 0.839161
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"id": "dec_conv2a",
|
|
308
|
+
"durationMs": 2.978014
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"id": "dec_conv2b",
|
|
312
|
+
"durationMs": 1.969207
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "dec_conv1a",
|
|
316
|
+
"durationMs": 4.433818
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"id": "dec_conv1b",
|
|
320
|
+
"durationMs": 3.116417
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"id": "dec_conv1c",
|
|
324
|
+
"durationMs": 0.194062
|
|
325
|
+
}
|
|
326
|
+
]
|
|
327
|
+
},
|
|
328
|
+
"runtimeInfo": {
|
|
329
|
+
"configuredEngine": "wgsl",
|
|
330
|
+
"gpuEngine": "wgsl",
|
|
331
|
+
"precision": "fp16",
|
|
332
|
+
"model": "oidn-unet-large-v1",
|
|
333
|
+
"modelFamily": "oidn-unet-large",
|
|
334
|
+
"inputChannels": 9,
|
|
335
|
+
"dynamicTile": {
|
|
336
|
+
"enabled": false,
|
|
337
|
+
"currentTileSize": 512,
|
|
338
|
+
"minTileSize": 256,
|
|
339
|
+
"maxTileSize": 512,
|
|
340
|
+
"targetTileTimeMs": 16
|
|
341
|
+
},
|
|
342
|
+
"lastExecution": {
|
|
343
|
+
"width": 512,
|
|
344
|
+
"height": 512,
|
|
345
|
+
"tileWidth": 512,
|
|
346
|
+
"tileHeight": 512,
|
|
347
|
+
"tileCount": 1,
|
|
348
|
+
"durationMs": 28.5,
|
|
349
|
+
"tileTimeMs": {
|
|
350
|
+
"min": 28.5,
|
|
351
|
+
"median": 28.5,
|
|
352
|
+
"mean": 28.5,
|
|
353
|
+
"max": 28.5
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"supportsFP16": true,
|
|
358
|
+
"adapter": {
|
|
359
|
+
"vendor": "apple",
|
|
360
|
+
"architecture": "metal-3",
|
|
361
|
+
"device": "",
|
|
362
|
+
"description": ""
|
|
363
|
+
},
|
|
364
|
+
"summary": {
|
|
365
|
+
"minMs": 27.599999994039536,
|
|
366
|
+
"medianMs": 27.700000002980232,
|
|
367
|
+
"meanMs": 27.666666666666668,
|
|
368
|
+
"p95Ms": 27.700000002980232,
|
|
369
|
+
"maxMs": 27.700000002980232
|
|
370
|
+
},
|
|
371
|
+
"messages": [],
|
|
372
|
+
"validation": {
|
|
373
|
+
"sampleCount": 6144,
|
|
374
|
+
"meanAbsoluteError": 0.0010210334021394374,
|
|
375
|
+
"rootMeanSquaredError": 0.001609680379854656,
|
|
376
|
+
"maxAbsoluteError": 0.012395620346069336,
|
|
377
|
+
"passed": true,
|
|
378
|
+
"thresholds": {
|
|
379
|
+
"maxMeanError": 0.005,
|
|
380
|
+
"maxAbsoluteError": 0.05
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# oidn-web benchmark
|
|
2
|
+
|
|
3
|
+
- Current: `5d9c1c8771e2a03c90bfadafec4b5dd28fada446`
|
|
4
|
+
- TFJS baseline: `136c00c34aa5cf4561b4137034dbd643177f0a5f`
|
|
5
|
+
- Input: 512x512, fixed tile 512, 3 runs after 1 warmup(s)
|
|
6
|
+
- Adapter: apple
|
|
7
|
+
|
|
8
|
+
| Runtime | Init ms | Median ms | P95 ms | Speedup | Precision |
|
|
9
|
+
| --- | ---: | ---: | ---: | ---: | --- |
|
|
10
|
+
| TFJS (136c00c) | 8.70 | 34.80 | 35.30 | 1.00x | fp32 |
|
|
11
|
+
| WGSL FP32 | 37.90 | 35.80 | 35.90 | 0.97x | fp32 |
|
|
12
|
+
| WGSL FP16 | 30.10 | 27.70 | 27.70 | 1.26x | fp16 |
|
|
13
|
+
|
|
14
|
+
## Output validation
|
|
15
|
+
|
|
16
|
+
Compared against sampled TFJS FP32 output.
|
|
17
|
+
|
|
18
|
+
| Runtime | Status | MAE | RMSE | Max error | Samples |
|
|
19
|
+
| --- | --- | ---: | ---: | ---: | ---: |
|
|
20
|
+
| WGSL FP32 | pass | 1.11e-6 | 1.81e-6 | 1.36e-5 | 6144 |
|
|
21
|
+
| WGSL FP16 | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
|
|
22
|
+
|
|
23
|
+
## GPU hot layers
|
|
24
|
+
|
|
25
|
+
### WGSL FP32
|
|
26
|
+
|
|
27
|
+
Profiled GPU total: 35.49 ms
|
|
28
|
+
|
|
29
|
+
| Node | GPU ms |
|
|
30
|
+
| --- | ---: |
|
|
31
|
+
| dec_conv1a | 6.91 |
|
|
32
|
+
| dec_conv2a | 4.37 |
|
|
33
|
+
| enc_conv1b | 3.79 |
|
|
34
|
+
| dec_conv1b | 3.75 |
|
|
35
|
+
| dec_conv3a | 2.49 |
|
|
36
|
+
|
|
37
|
+
### WGSL FP16
|
|
38
|
+
|
|
39
|
+
Profiled GPU total: 26.97 ms
|
|
40
|
+
|
|
41
|
+
| Node | GPU ms |
|
|
42
|
+
| --- | ---: |
|
|
43
|
+
| dec_conv1a | 4.43 |
|
|
44
|
+
| enc_conv1b | 3.20 |
|
|
45
|
+
| dec_conv1b | 3.12 |
|
|
46
|
+
| dec_conv2a | 2.98 |
|
|
47
|
+
| enc_conv2b | 2.00 |
|