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.
Files changed (122) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +140 -4
  3. package/benchmarks/compare.mjs +651 -0
  4. package/benchmarks/leak.mjs +255 -0
  5. package/benchmarks/results/before-spatial.json +391 -0
  6. package/benchmarks/results/before-spatial.md +47 -0
  7. package/benchmarks/results/int8-scan.json +2007 -0
  8. package/benchmarks/results/int8-scan.md +160 -0
  9. package/benchmarks/results/int8-w8a8-scan.json +2007 -0
  10. package/benchmarks/results/int8-w8a8-scan.md +160 -0
  11. package/benchmarks/results/int8-weight-channel.json +1413 -0
  12. package/benchmarks/results/int8-weight-channel.md +118 -0
  13. package/benchmarks/results/int8-weight-only.json +1437 -0
  14. package/benchmarks/results/int8-weight-only.md +118 -0
  15. package/benchmarks/results/kernel-webnn-final.json +1115 -0
  16. package/benchmarks/results/kernel-webnn-final.md +104 -0
  17. package/benchmarks/results/latest-optimized.json +375 -0
  18. package/benchmarks/results/latest-optimized.md +47 -0
  19. package/benchmarks/results/latest.json +391 -0
  20. package/benchmarks/results/latest.md +47 -0
  21. package/benchmarks/results/profile-baseline.json +331 -0
  22. package/benchmarks/results/profile-baseline.md +12 -0
  23. package/benchmarks/results/profile-conv2x.json +331 -0
  24. package/benchmarks/results/profile-conv2x.md +12 -0
  25. package/benchmarks/results/profile-fast-init.json +385 -0
  26. package/benchmarks/results/profile-fast-init.md +47 -0
  27. package/benchmarks/results/profile-fp16-fma.json +369 -0
  28. package/benchmarks/results/profile-fp16-fma.md +47 -0
  29. package/benchmarks/results/profile-fp16-tiled-decoder.json +369 -0
  30. package/benchmarks/results/profile-fp16-tiled-decoder.md +47 -0
  31. package/benchmarks/results/profile-fp16-tiled-encoder.json +369 -0
  32. package/benchmarks/results/profile-fp16-tiled-encoder.md +47 -0
  33. package/benchmarks/results/profile-fp16-unfused-pool.json +385 -0
  34. package/benchmarks/results/profile-fp16-unfused-pool.md +47 -0
  35. package/benchmarks/results/profile-input-major.json +347 -0
  36. package/benchmarks/results/profile-input-major.md +12 -0
  37. package/benchmarks/results/profile-k16.json +347 -0
  38. package/benchmarks/results/profile-k16.md +12 -0
  39. package/benchmarks/results/profile-k4.json +347 -0
  40. package/benchmarks/results/profile-k4.md +12 -0
  41. package/benchmarks/results/profile-pool-reuse.json +331 -0
  42. package/benchmarks/results/profile-pool-reuse.md +12 -0
  43. package/benchmarks/results/profile-precompiled.json +385 -0
  44. package/benchmarks/results/profile-precompiled.md +47 -0
  45. package/benchmarks/results/profile-static-channels.json +385 -0
  46. package/benchmarks/results/profile-static-channels.md +47 -0
  47. package/benchmarks/results/profile-static-io.json +385 -0
  48. package/benchmarks/results/profile-static-io.md +47 -0
  49. package/benchmarks/results/profile-tiled-conv.json +331 -0
  50. package/benchmarks/results/profile-tiled-conv.md +12 -0
  51. package/benchmarks/results/profile-tiled-decoder.json +347 -0
  52. package/benchmarks/results/profile-tiled-decoder.md +12 -0
  53. package/benchmarks/results/profile-tiled-matmul.json +331 -0
  54. package/benchmarks/results/profile-tiled-matmul.md +12 -0
  55. package/benchmarks/results/profile-unfused-decoder.json +379 -0
  56. package/benchmarks/results/profile-unfused-decoder.md +12 -0
  57. package/benchmarks/results/profile-unfused-pool.json +347 -0
  58. package/benchmarks/results/profile-unfused-pool.md +12 -0
  59. package/benchmarks/results/spatial-auto.json +575 -0
  60. package/benchmarks/results/spatial-auto.md +61 -0
  61. package/benchmarks/results/subgroup-smoke.json +1094 -0
  62. package/benchmarks/results/subgroup-smoke.md +104 -0
  63. package/benchmarks/results/webnn-smoke.json +739 -0
  64. package/benchmarks/results/webnn-smoke.md +76 -0
  65. package/dist/oidn.js +4189 -22603
  66. package/dist/oidn.umd.cjs +784 -5807
  67. package/lib/UNet.d.ts +66 -15
  68. package/lib/UNet.js +162 -257
  69. package/lib/UNet.js.map +1 -1
  70. package/lib/WGPUComputePass.d.ts +1 -1
  71. package/lib/WGPUComputePass.js +6 -4
  72. package/lib/WGPUComputePass.js.map +1 -1
  73. package/lib/backend.d.ts +8 -4
  74. package/lib/backend.js +36 -44
  75. package/lib/backend.js.map +1 -1
  76. package/lib/graphOptimizer.d.ts +54 -0
  77. package/lib/graphOptimizer.js +216 -0
  78. package/lib/graphOptimizer.js.map +1 -0
  79. package/lib/main.d.ts +33 -10
  80. package/lib/main.js +5 -0
  81. package/lib/main.js.map +1 -1
  82. package/lib/modelSpec.d.ts +80 -0
  83. package/lib/modelSpec.js +270 -0
  84. package/lib/modelSpec.js.map +1 -0
  85. package/lib/nativeUNet.d.ts +67 -0
  86. package/lib/nativeUNet.js +1735 -0
  87. package/lib/nativeUNet.js.map +1 -0
  88. package/lib/process.js +38 -35
  89. package/lib/process.js.map +1 -1
  90. package/lib/resourceTracker.d.ts +26 -0
  91. package/lib/resourceTracker.js +65 -0
  92. package/lib/resourceTracker.js.map +1 -0
  93. package/lib/tileScheduler.d.ts +33 -0
  94. package/lib/tileScheduler.js +86 -0
  95. package/lib/tileScheduler.js.map +1 -0
  96. package/lib/webnnUNet.d.ts +52 -0
  97. package/lib/webnnUNet.js +535 -0
  98. package/lib/webnnUNet.js.map +1 -0
  99. package/package.json +9 -5
  100. package/scripts/inspect-model.mjs +64 -0
  101. package/src/UNet.ts +236 -339
  102. package/src/WGPUComputePass.ts +6 -4
  103. package/src/backend.ts +42 -55
  104. package/src/graphOptimizer.ts +301 -0
  105. package/src/main.ts +71 -11
  106. package/src/modelSpec.ts +414 -0
  107. package/src/nativeUNet.ts +2256 -0
  108. package/src/process.ts +38 -36
  109. package/src/resourceTracker.ts +94 -0
  110. package/src/tileScheduler.ts +138 -0
  111. package/src/webnnUNet.ts +812 -0
  112. package/tests/modelSpec.test.mjs +128 -0
  113. package/tests/resourceLifecycle.test.mjs +383 -0
  114. package/tests/tileScheduler.test.mjs +90 -0
  115. package/lib/helper.d.ts +0 -4
  116. package/lib/helper.js +0 -33
  117. package/lib/helper.js.map +0 -1
  118. package/lib/kernels.d.ts +0 -1
  119. package/lib/kernels.js +0 -26
  120. package/lib/kernels.js.map +0 -1
  121. package/src/helper.ts +0 -43
  122. package/src/kernels.ts +0 -31
@@ -0,0 +1,575 @@
1
+ {
2
+ "generatedAt": "2026-08-20T04:48:54.112Z",
3
+ "currentCommit": "e6b8577b1c69cc8ce979022717984aec5b9ea881",
4
+ "baselineCommit": "136c00c34aa5cf4561b4137034dbd643177f0a5f",
5
+ "settings": {
6
+ "width": 512,
7
+ "height": 512,
8
+ "tileSize": 512,
9
+ "warmup": 2,
10
+ "runs": 5,
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": 9,
27
+ "timesMs": [
28
+ 37.5,
29
+ 37,
30
+ 37.100000001490116,
31
+ 37.29999999701977,
32
+ 37.70000000298023
33
+ ],
34
+ "supportsFP16": true,
35
+ "adapter": {
36
+ "vendor": "apple",
37
+ "architecture": "metal-3",
38
+ "device": "",
39
+ "description": ""
40
+ },
41
+ "summary": {
42
+ "minMs": 37,
43
+ "medianMs": 37.29999999701977,
44
+ "meanMs": 37.32000000029802,
45
+ "p95Ms": 37.70000000298023,
46
+ "maxMs": 37.70000000298023
47
+ },
48
+ "messages": []
49
+ },
50
+ {
51
+ "label": "WGSL FP32",
52
+ "bundle": "current",
53
+ "baseline": false,
54
+ "precision": "fp32",
55
+ "initializationMs": 38.600000001490116,
56
+ "timesMs": [
57
+ 37.900000005960464,
58
+ 38,
59
+ 37.29999999701977,
60
+ 38.100000001490116,
61
+ 37.29999999701977
62
+ ],
63
+ "executionProfile": {
64
+ "totalMs": 37.46062,
65
+ "layers": [
66
+ {
67
+ "id": "input-pack",
68
+ "durationMs": 0.051206
69
+ },
70
+ {
71
+ "id": "enc_conv1a",
72
+ "durationMs": 1.406145
73
+ },
74
+ {
75
+ "id": "enc_conv1b",
76
+ "durationMs": 3.828992
77
+ },
78
+ {
79
+ "id": "pool1",
80
+ "durationMs": 0.417481
81
+ },
82
+ {
83
+ "id": "enc_conv2a",
84
+ "durationMs": 1.402811
85
+ },
86
+ {
87
+ "id": "enc_conv2b",
88
+ "durationMs": 2.168693
89
+ },
90
+ {
91
+ "id": "pool2",
92
+ "durationMs": 0.39194
93
+ },
94
+ {
95
+ "id": "enc_conv3a",
96
+ "durationMs": 0.943749
97
+ },
98
+ {
99
+ "id": "enc_conv3b",
100
+ "durationMs": 0.996538
101
+ },
102
+ {
103
+ "id": "pool3",
104
+ "durationMs": 0.018374
105
+ },
106
+ {
107
+ "id": "enc_conv4a",
108
+ "durationMs": 0.399774
109
+ },
110
+ {
111
+ "id": "enc_conv4b",
112
+ "durationMs": 0.609222
113
+ },
114
+ {
115
+ "id": "pool4",
116
+ "durationMs": 0.008582
117
+ },
118
+ {
119
+ "id": "enc_conv5a",
120
+ "durationMs": 0.256989
121
+ },
122
+ {
123
+ "id": "enc_conv5b",
124
+ "durationMs": 0.337401
125
+ },
126
+ {
127
+ "id": "dec_conv4a",
128
+ "durationMs": 1.243484
129
+ },
130
+ {
131
+ "id": "dec_conv4b",
132
+ "durationMs": 0.609264
133
+ },
134
+ {
135
+ "id": "dec_conv3a",
136
+ "durationMs": 2.330977
137
+ },
138
+ {
139
+ "id": "dec_conv3b",
140
+ "durationMs": 1.270983
141
+ },
142
+ {
143
+ "id": "dec_conv2a",
144
+ "durationMs": 4.547001
145
+ },
146
+ {
147
+ "id": "dec_conv2b",
148
+ "durationMs": 2.158151
149
+ },
150
+ {
151
+ "id": "dec_conv1a",
152
+ "durationMs": 7.394786
153
+ },
154
+ {
155
+ "id": "dec_conv1b",
156
+ "durationMs": 4.171225
157
+ },
158
+ {
159
+ "id": "dec_conv1c",
160
+ "durationMs": 0.496852
161
+ }
162
+ ]
163
+ },
164
+ "runtimeInfo": {
165
+ "configuredEngine": "wgsl",
166
+ "gpuEngine": "wgsl",
167
+ "precision": "fp32",
168
+ "kernel": {
169
+ "configured": "auto",
170
+ "maxSpatialInputBlocks": 0
171
+ },
172
+ "model": "oidn-unet-large-v1",
173
+ "modelFamily": "oidn-unet-large",
174
+ "inputChannels": 9,
175
+ "dynamicTile": {
176
+ "enabled": false,
177
+ "currentTileSize": 512,
178
+ "minTileSize": 256,
179
+ "maxTileSize": 512,
180
+ "targetTileTimeMs": 16
181
+ },
182
+ "lastExecution": {
183
+ "width": 512,
184
+ "height": 512,
185
+ "tileWidth": 512,
186
+ "tileHeight": 512,
187
+ "tileCount": 1,
188
+ "durationMs": 39.20000000298023,
189
+ "tileTimeMs": {
190
+ "min": 39.20000000298023,
191
+ "median": 39.20000000298023,
192
+ "mean": 39.20000000298023,
193
+ "max": 39.20000000298023
194
+ }
195
+ }
196
+ },
197
+ "supportsFP16": true,
198
+ "adapter": {
199
+ "vendor": "apple",
200
+ "architecture": "metal-3",
201
+ "device": "",
202
+ "description": ""
203
+ },
204
+ "summary": {
205
+ "minMs": 37.29999999701977,
206
+ "medianMs": 37.900000005960464,
207
+ "meanMs": 37.72000000029802,
208
+ "p95Ms": 38.100000001490116,
209
+ "maxMs": 38.100000001490116
210
+ },
211
+ "messages": [],
212
+ "validation": {
213
+ "sampleCount": 6144,
214
+ "meanAbsoluteError": 0.0000011096847932397698,
215
+ "rootMeanSquaredError": 0.0000018071588418628667,
216
+ "maxAbsoluteError": 0.000013589859008789062,
217
+ "passed": true,
218
+ "thresholds": {
219
+ "maxMeanError": 0.0001,
220
+ "maxAbsoluteError": 0.001
221
+ }
222
+ }
223
+ },
224
+ {
225
+ "label": "WGSL FP16 Direct",
226
+ "bundle": "current",
227
+ "baseline": false,
228
+ "precision": "fp16",
229
+ "kernel": "direct",
230
+ "initializationMs": 30.69999999552965,
231
+ "timesMs": [
232
+ 30.299999997019768,
233
+ 30.30000000447035,
234
+ 29.399999998509884,
235
+ 30.100000001490116,
236
+ 29.899999998509884
237
+ ],
238
+ "executionProfile": {
239
+ "totalMs": 29.140974999999997,
240
+ "layers": [
241
+ {
242
+ "id": "input-pack",
243
+ "durationMs": 0.446681
244
+ },
245
+ {
246
+ "id": "enc_conv1a",
247
+ "durationMs": 0.634003
248
+ },
249
+ {
250
+ "id": "enc_conv1b",
251
+ "durationMs": 3.123184
252
+ },
253
+ {
254
+ "id": "pool1",
255
+ "durationMs": 0.337396
256
+ },
257
+ {
258
+ "id": "enc_conv2a",
259
+ "durationMs": 1.162887
260
+ },
261
+ {
262
+ "id": "enc_conv2b",
263
+ "durationMs": 1.97238
264
+ },
265
+ {
266
+ "id": "pool2",
267
+ "durationMs": 0.050289
268
+ },
269
+ {
270
+ "id": "enc_conv3a",
271
+ "durationMs": 1.250132
272
+ },
273
+ {
274
+ "id": "enc_conv3b",
275
+ "durationMs": 0.896529
276
+ },
277
+ {
278
+ "id": "pool3",
279
+ "durationMs": 0.018166
280
+ },
281
+ {
282
+ "id": "enc_conv4a",
283
+ "durationMs": 0.342479
284
+ },
285
+ {
286
+ "id": "enc_conv4b",
287
+ "durationMs": 0.531717
288
+ },
289
+ {
290
+ "id": "pool4",
291
+ "durationMs": 0.010958
292
+ },
293
+ {
294
+ "id": "enc_conv5a",
295
+ "durationMs": 0.187323
296
+ },
297
+ {
298
+ "id": "enc_conv5b",
299
+ "durationMs": 0.23082
300
+ },
301
+ {
302
+ "id": "dec_conv4a",
303
+ "durationMs": 0.945734
304
+ },
305
+ {
306
+ "id": "dec_conv4b",
307
+ "durationMs": 0.535134
308
+ },
309
+ {
310
+ "id": "dec_conv3a",
311
+ "durationMs": 1.69773
312
+ },
313
+ {
314
+ "id": "dec_conv3b",
315
+ "durationMs": 0.835783
316
+ },
317
+ {
318
+ "id": "dec_conv2a",
319
+ "durationMs": 3.644611
320
+ },
321
+ {
322
+ "id": "dec_conv2b",
323
+ "durationMs": 1.975421
324
+ },
325
+ {
326
+ "id": "dec_conv1a",
327
+ "durationMs": 5.004736
328
+ },
329
+ {
330
+ "id": "dec_conv1b",
331
+ "durationMs": 3.114102
332
+ },
333
+ {
334
+ "id": "dec_conv1c",
335
+ "durationMs": 0.19278
336
+ }
337
+ ]
338
+ },
339
+ "runtimeInfo": {
340
+ "configuredEngine": "wgsl",
341
+ "gpuEngine": "wgsl",
342
+ "precision": "fp16",
343
+ "kernel": {
344
+ "configured": "direct",
345
+ "maxSpatialInputBlocks": 40
346
+ },
347
+ "model": "oidn-unet-large-v1",
348
+ "modelFamily": "oidn-unet-large",
349
+ "inputChannels": 9,
350
+ "dynamicTile": {
351
+ "enabled": false,
352
+ "currentTileSize": 512,
353
+ "minTileSize": 256,
354
+ "maxTileSize": 512,
355
+ "targetTileTimeMs": 16
356
+ },
357
+ "lastExecution": {
358
+ "width": 512,
359
+ "height": 512,
360
+ "tileWidth": 512,
361
+ "tileHeight": 512,
362
+ "tileCount": 1,
363
+ "durationMs": 30.69999999552965,
364
+ "tileTimeMs": {
365
+ "min": 30.69999999552965,
366
+ "median": 30.69999999552965,
367
+ "mean": 30.69999999552965,
368
+ "max": 30.69999999552965
369
+ }
370
+ }
371
+ },
372
+ "supportsFP16": true,
373
+ "adapter": {
374
+ "vendor": "apple",
375
+ "architecture": "metal-3",
376
+ "device": "",
377
+ "description": ""
378
+ },
379
+ "summary": {
380
+ "minMs": 29.399999998509884,
381
+ "medianMs": 30.100000001490116,
382
+ "meanMs": 30,
383
+ "p95Ms": 30.30000000447035,
384
+ "maxMs": 30.30000000447035
385
+ },
386
+ "messages": [],
387
+ "validation": {
388
+ "sampleCount": 6144,
389
+ "meanAbsoluteError": 0.0010210334021394374,
390
+ "rootMeanSquaredError": 0.001609680379854656,
391
+ "maxAbsoluteError": 0.012395620346069336,
392
+ "passed": true,
393
+ "thresholds": {
394
+ "maxMeanError": 0.005,
395
+ "maxAbsoluteError": 0.05
396
+ }
397
+ }
398
+ },
399
+ {
400
+ "label": "WGSL FP16 Adaptive",
401
+ "bundle": "current",
402
+ "baseline": false,
403
+ "precision": "fp16",
404
+ "kernel": "auto",
405
+ "initializationMs": 123.89999999850988,
406
+ "timesMs": [
407
+ 65.89999999850988,
408
+ 65.60000000149012,
409
+ 64.5,
410
+ 65.5,
411
+ 65.20000000298023
412
+ ],
413
+ "executionProfile": {
414
+ "totalMs": 65.040055,
415
+ "layers": [
416
+ {
417
+ "id": "input-pack",
418
+ "durationMs": 0.044998
419
+ },
420
+ {
421
+ "id": "enc_conv1a",
422
+ "durationMs": 0.720644
423
+ },
424
+ {
425
+ "id": "enc_conv1b",
426
+ "durationMs": 6.022776
427
+ },
428
+ {
429
+ "id": "pool1",
430
+ "durationMs": 0.34803
431
+ },
432
+ {
433
+ "id": "enc_conv2a",
434
+ "durationMs": 2.047354
435
+ },
436
+ {
437
+ "id": "enc_conv2b",
438
+ "durationMs": 4.902892
439
+ },
440
+ {
441
+ "id": "pool2",
442
+ "durationMs": 0.054665
443
+ },
444
+ {
445
+ "id": "enc_conv3a",
446
+ "durationMs": 1.430082
447
+ },
448
+ {
449
+ "id": "enc_conv3b",
450
+ "durationMs": 2.580421
451
+ },
452
+ {
453
+ "id": "pool3",
454
+ "durationMs": 0.015666
455
+ },
456
+ {
457
+ "id": "enc_conv4a",
458
+ "durationMs": 1.410749
459
+ },
460
+ {
461
+ "id": "enc_conv4b",
462
+ "durationMs": 0.933222
463
+ },
464
+ {
465
+ "id": "pool4",
466
+ "durationMs": 0.053623
467
+ },
468
+ {
469
+ "id": "enc_conv5a",
470
+ "durationMs": 0.191161
471
+ },
472
+ {
473
+ "id": "enc_conv5b",
474
+ "durationMs": 0.237993
475
+ },
476
+ {
477
+ "id": "dec_conv4a",
478
+ "durationMs": 0.96847
479
+ },
480
+ {
481
+ "id": "dec_conv4b",
482
+ "durationMs": 0.535859
483
+ },
484
+ {
485
+ "id": "dec_conv3a",
486
+ "durationMs": 1.717239
487
+ },
488
+ {
489
+ "id": "dec_conv3b",
490
+ "durationMs": 2.881037
491
+ },
492
+ {
493
+ "id": "dec_conv2a",
494
+ "durationMs": 3.642306
495
+ },
496
+ {
497
+ "id": "dec_conv2b",
498
+ "durationMs": 4.314618
499
+ },
500
+ {
501
+ "id": "dec_conv1a",
502
+ "durationMs": 23.615654
503
+ },
504
+ {
505
+ "id": "dec_conv1b",
506
+ "durationMs": 6.005524
507
+ },
508
+ {
509
+ "id": "dec_conv1c",
510
+ "durationMs": 0.365072
511
+ }
512
+ ]
513
+ },
514
+ "runtimeInfo": {
515
+ "configuredEngine": "wgsl",
516
+ "gpuEngine": "wgsl",
517
+ "precision": "fp16",
518
+ "kernel": {
519
+ "configured": "auto",
520
+ "maxSpatialInputBlocks": 40
521
+ },
522
+ "model": "oidn-unet-large-v1",
523
+ "modelFamily": "oidn-unet-large",
524
+ "inputChannels": 9,
525
+ "dynamicTile": {
526
+ "enabled": false,
527
+ "currentTileSize": 512,
528
+ "minTileSize": 256,
529
+ "maxTileSize": 512,
530
+ "targetTileTimeMs": 16
531
+ },
532
+ "lastExecution": {
533
+ "width": 512,
534
+ "height": 512,
535
+ "tileWidth": 512,
536
+ "tileHeight": 512,
537
+ "tileCount": 1,
538
+ "durationMs": 66.60000000149012,
539
+ "tileTimeMs": {
540
+ "min": 66.60000000149012,
541
+ "median": 66.60000000149012,
542
+ "mean": 66.60000000149012,
543
+ "max": 66.60000000149012
544
+ }
545
+ }
546
+ },
547
+ "supportsFP16": true,
548
+ "adapter": {
549
+ "vendor": "apple",
550
+ "architecture": "metal-3",
551
+ "device": "",
552
+ "description": ""
553
+ },
554
+ "summary": {
555
+ "minMs": 64.5,
556
+ "medianMs": 65.5,
557
+ "meanMs": 65.34000000059605,
558
+ "p95Ms": 65.89999999850988,
559
+ "maxMs": 65.89999999850988
560
+ },
561
+ "messages": [],
562
+ "validation": {
563
+ "sampleCount": 6144,
564
+ "meanAbsoluteError": 0.0010210334021394374,
565
+ "rootMeanSquaredError": 0.001609680379854656,
566
+ "maxAbsoluteError": 0.012395620346069336,
567
+ "passed": true,
568
+ "thresholds": {
569
+ "maxMeanError": 0.005,
570
+ "maxAbsoluteError": 0.05
571
+ }
572
+ }
573
+ }
574
+ ]
575
+ }
@@ -0,0 +1,61 @@
1
+ # oidn-web benchmark
2
+
3
+ - Current: `e6b8577b1c69cc8ce979022717984aec5b9ea881`
4
+ - TFJS baseline: `136c00c34aa5cf4561b4137034dbd643177f0a5f`
5
+ - Input: 512x512, fixed tile 512, 5 runs after 2 warmup(s)
6
+ - Adapter: apple
7
+
8
+ | Runtime | Init ms | Median ms | P95 ms | Speedup | Precision |
9
+ | --- | ---: | ---: | ---: | ---: | --- |
10
+ | TFJS (136c00c) | 9.00 | 37.30 | 37.70 | 1.00x | fp32 |
11
+ | WGSL FP32 | 38.60 | 37.90 | 38.10 | 0.98x | fp32 |
12
+ | WGSL FP16 Direct | 30.70 | 30.10 | 30.30 | 1.24x | fp16 |
13
+ | WGSL FP16 Adaptive | 123.90 | 65.50 | 65.90 | 0.57x | fp16 |
14
+
15
+ ## Output validation
16
+
17
+ Compared against sampled TFJS FP32 output.
18
+
19
+ | Runtime | Status | MAE | RMSE | Max error | Samples |
20
+ | --- | --- | ---: | ---: | ---: | ---: |
21
+ | WGSL FP32 | pass | 1.11e-6 | 1.81e-6 | 1.36e-5 | 6144 |
22
+ | WGSL FP16 Direct | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
23
+ | WGSL FP16 Adaptive | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
24
+
25
+ ## GPU hot layers
26
+
27
+ ### WGSL FP32
28
+
29
+ Profiled GPU total: 37.46 ms
30
+
31
+ | Node | GPU ms |
32
+ | --- | ---: |
33
+ | dec_conv1a | 7.39 |
34
+ | dec_conv2a | 4.55 |
35
+ | dec_conv1b | 4.17 |
36
+ | enc_conv1b | 3.83 |
37
+ | dec_conv3a | 2.33 |
38
+
39
+ ### WGSL FP16 Direct
40
+
41
+ Profiled GPU total: 29.14 ms
42
+
43
+ | Node | GPU ms |
44
+ | --- | ---: |
45
+ | dec_conv1a | 5.00 |
46
+ | dec_conv2a | 3.64 |
47
+ | enc_conv1b | 3.12 |
48
+ | dec_conv1b | 3.11 |
49
+ | dec_conv2b | 1.98 |
50
+
51
+ ### WGSL FP16 Adaptive
52
+
53
+ Profiled GPU total: 65.04 ms
54
+
55
+ | Node | GPU ms |
56
+ | --- | ---: |
57
+ | dec_conv1a | 23.62 |
58
+ | enc_conv1b | 6.02 |
59
+ | dec_conv1b | 6.01 |
60
+ | enc_conv2b | 4.90 |
61
+ | dec_conv2b | 4.31 |