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,104 @@
1
+ # oidn-web benchmark
2
+
3
+ - Current: `e6b8577b1c69cc8ce979022717984aec5b9ea881`
4
+ - TFJS baseline: `136c00c34aa5cf4561b4137034dbd643177f0a5f`
5
+ - Input: 512x512, fixed tile 512, 5 runs after 1 warmup(s)
6
+ - Adapter: apple
7
+
8
+ | Runtime | Init ms | Median ms | P95 ms | Speedup | Precision |
9
+ | --- | ---: | ---: | ---: | ---: | --- |
10
+ | TFJS (136c00c) | 9.40 | 35.20 | 35.40 | 1.00x | fp32 |
11
+ | WGSL FP32 Auto | 39.20 | 36.30 | 36.50 | 0.97x | fp32 |
12
+ | WGSL FP32 Direct | 37.60 | 63.30 | 63.40 | 0.56x | fp32 |
13
+ | WGSL FP16 Direct | 27.60 | 27.80 | 28.00 | 1.27x | fp16 |
14
+ | WGSL FP16 Implicit GEMM | 30.30 | 29.20 | 29.30 | 1.21x | fp16 |
15
+ | WGSL FP16 Spatial (experimental) | 28.30 | 61.70 | 62.10 | 0.57x | fp16 |
16
+ | WGSL FP16 Subgroup (experimental) | 29.20 | 29.50 | 29.60 | 1.19x | fp16 |
17
+ | WebNN FP16 (experimental) | skipped | - | - | - | Error: WebNN FP16 WebGPU interop failed: NotSupportedError: Failed to execute 'createExportableTensor' on 'MLContext': WebGPU Interop is not supported. |
18
+
19
+ ## Output validation
20
+
21
+ Compared against sampled TFJS FP32 output.
22
+
23
+ | Runtime | Status | MAE | RMSE | Max error | Samples |
24
+ | --- | --- | ---: | ---: | ---: | ---: |
25
+ | WGSL FP32 Auto | pass | 1.11e-6 | 1.81e-6 | 1.36e-5 | 6144 |
26
+ | WGSL FP32 Direct | pass | 1.11e-6 | 1.81e-6 | 1.36e-5 | 6144 |
27
+ | WGSL FP16 Direct | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
28
+ | WGSL FP16 Implicit GEMM | pass | 1.56e-3 | 2.55e-3 | 4.48e-2 | 6144 |
29
+ | WGSL FP16 Spatial (experimental) | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
30
+ | WGSL FP16 Subgroup (experimental) | pass | 1.02e-3 | 1.61e-3 | 1.24e-2 | 6144 |
31
+
32
+ ## GPU hot layers
33
+
34
+ ### WGSL FP32 Auto
35
+
36
+ Profiled GPU total: 35.24 ms
37
+
38
+ | Node | GPU ms |
39
+ | --- | ---: |
40
+ | dec_conv1a | 6.89 |
41
+ | dec_conv2a | 4.46 |
42
+ | enc_conv1b | 3.82 |
43
+ | dec_conv1b | 3.75 |
44
+ | dec_conv3a | 2.34 |
45
+
46
+ ### WGSL FP32 Direct
47
+
48
+ Profiled GPU total: 62.20 ms
49
+
50
+ | Node | GPU ms |
51
+ | --- | ---: |
52
+ | dec_conv1a | 9.60 |
53
+ | dec_conv1b | 8.66 |
54
+ | enc_conv1b | 8.57 |
55
+ | dec_conv2a | 6.76 |
56
+ | dec_conv2b | 5.50 |
57
+
58
+ ### WGSL FP16 Direct
59
+
60
+ Profiled GPU total: 27.07 ms
61
+
62
+ | Node | GPU ms |
63
+ | --- | ---: |
64
+ | dec_conv1a | 4.51 |
65
+ | enc_conv1b | 3.19 |
66
+ | dec_conv1b | 3.10 |
67
+ | dec_conv2a | 2.97 |
68
+ | enc_conv2b | 2.00 |
69
+
70
+ ### WGSL FP16 Implicit GEMM
71
+
72
+ Profiled GPU total: 28.77 ms
73
+
74
+ | Node | GPU ms |
75
+ | --- | ---: |
76
+ | dec_conv1a | 5.85 |
77
+ | dec_conv2a | 3.66 |
78
+ | dec_conv1b | 2.93 |
79
+ | enc_conv1b | 2.93 |
80
+ | dec_conv3a | 1.90 |
81
+
82
+ ### WGSL FP16 Spatial (experimental)
83
+
84
+ Profiled GPU total: 61.42 ms
85
+
86
+ | Node | GPU ms |
87
+ | --- | ---: |
88
+ | dec_conv1a | 22.28 |
89
+ | enc_conv1b | 5.43 |
90
+ | dec_conv1b | 5.41 |
91
+ | dec_conv2b | 4.41 |
92
+ | enc_conv2b | 4.41 |
93
+
94
+ ### WGSL FP16 Subgroup (experimental)
95
+
96
+ Profiled GPU total: 29.05 ms
97
+
98
+ | Node | GPU ms |
99
+ | --- | ---: |
100
+ | dec_conv1a | 4.58 |
101
+ | enc_conv1b | 3.47 |
102
+ | dec_conv1b | 3.35 |
103
+ | dec_conv2a | 3.11 |
104
+ | enc_conv2b | 2.16 |
@@ -0,0 +1,375 @@
1
+ {
2
+ "generatedAt": "2026-08-20T03:59:27.859Z",
3
+ "currentCommit": "5d9c1c8771e2a03c90bfadafec4b5dd28fada446",
4
+ "baselineCommit": "136c00c34aa5cf4561b4137034dbd643177f0a5f",
5
+ "settings": {
6
+ "width": 512,
7
+ "height": 512,
8
+ "tileSize": 512,
9
+ "warmup": 1,
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.100000001490116,
27
+ "timesMs": [
28
+ 34.899999998509884,
29
+ 35,
30
+ 35.100000001490116,
31
+ 34.5,
32
+ 35.100000001490116
33
+ ],
34
+ "supportsFP16": true,
35
+ "adapter": {
36
+ "vendor": "apple",
37
+ "architecture": "metal-3",
38
+ "device": "",
39
+ "description": ""
40
+ },
41
+ "summary": {
42
+ "minMs": 34.5,
43
+ "medianMs": 35,
44
+ "meanMs": 34.920000000298025,
45
+ "p95Ms": 35.100000001490116,
46
+ "maxMs": 35.100000001490116
47
+ },
48
+ "messages": []
49
+ },
50
+ {
51
+ "label": "WGSL FP32",
52
+ "bundle": "current",
53
+ "baseline": false,
54
+ "precision": "fp32",
55
+ "initializationMs": 348.5,
56
+ "timesMs": [
57
+ 41.100000001490116,
58
+ 41.5,
59
+ 41.29999999701977,
60
+ 41.30000000447035,
61
+ 41.29999999701977
62
+ ],
63
+ "executionProfile": {
64
+ "totalMs": 40.571729,
65
+ "layers": [
66
+ {
67
+ "id": "input-pack",
68
+ "durationMs": 0.051206
69
+ },
70
+ {
71
+ "id": "enc_conv1a",
72
+ "durationMs": 0.957123
73
+ },
74
+ {
75
+ "id": "enc_conv1b",
76
+ "durationMs": 4.522085
77
+ },
78
+ {
79
+ "id": "pool1",
80
+ "durationMs": 0.430064
81
+ },
82
+ {
83
+ "id": "enc_conv2a",
84
+ "durationMs": 1.667507
85
+ },
86
+ {
87
+ "id": "enc_conv2b",
88
+ "durationMs": 2.497385
89
+ },
90
+ {
91
+ "id": "pool2",
92
+ "durationMs": 0.054998
93
+ },
94
+ {
95
+ "id": "enc_conv3a",
96
+ "durationMs": 0.877502
97
+ },
98
+ {
99
+ "id": "enc_conv3b",
100
+ "durationMs": 1.16578
101
+ },
102
+ {
103
+ "id": "pool3",
104
+ "durationMs": 0.021374
105
+ },
106
+ {
107
+ "id": "enc_conv4a",
108
+ "durationMs": 0.478311
109
+ },
110
+ {
111
+ "id": "enc_conv4b",
112
+ "durationMs": 0.726759
113
+ },
114
+ {
115
+ "id": "pool4",
116
+ "durationMs": 0.011707
117
+ },
118
+ {
119
+ "id": "enc_conv5a",
120
+ "durationMs": 0.290404
121
+ },
122
+ {
123
+ "id": "enc_conv5b",
124
+ "durationMs": 0.384482
125
+ },
126
+ {
127
+ "id": "dec_conv4a",
128
+ "durationMs": 1.459184
129
+ },
130
+ {
131
+ "id": "dec_conv4b",
132
+ "durationMs": 0.718342
133
+ },
134
+ {
135
+ "id": "dec_conv3a",
136
+ "durationMs": 2.692501
137
+ },
138
+ {
139
+ "id": "dec_conv3b",
140
+ "durationMs": 1.162156
141
+ },
142
+ {
143
+ "id": "dec_conv2a",
144
+ "durationMs": 5.144015
145
+ },
146
+ {
147
+ "id": "dec_conv2b",
148
+ "durationMs": 2.493303
149
+ },
150
+ {
151
+ "id": "dec_conv1a",
152
+ "durationMs": 7.830059
153
+ },
154
+ {
155
+ "id": "dec_conv1b",
156
+ "durationMs": 4.44638
157
+ },
158
+ {
159
+ "id": "dec_conv1c",
160
+ "durationMs": 0.489102
161
+ }
162
+ ]
163
+ },
164
+ "runtimeInfo": {
165
+ "configuredEngine": "wgsl",
166
+ "gpuEngine": "wgsl",
167
+ "precision": "fp32",
168
+ "model": "oidn-unet-large-v1",
169
+ "modelFamily": "oidn-unet-large",
170
+ "inputChannels": 9,
171
+ "dynamicTile": {
172
+ "enabled": false,
173
+ "currentTileSize": 512,
174
+ "minTileSize": 256,
175
+ "maxTileSize": 512,
176
+ "targetTileTimeMs": 16
177
+ },
178
+ "lastExecution": {
179
+ "width": 512,
180
+ "height": 512,
181
+ "tileWidth": 512,
182
+ "tileHeight": 512,
183
+ "tileCount": 1,
184
+ "durationMs": 42.20000000298023,
185
+ "tileTimeMs": {
186
+ "min": 42.20000000298023,
187
+ "median": 42.20000000298023,
188
+ "mean": 42.20000000298023,
189
+ "max": 42.20000000298023
190
+ }
191
+ }
192
+ },
193
+ "supportsFP16": true,
194
+ "adapter": {
195
+ "vendor": "apple",
196
+ "architecture": "metal-3",
197
+ "device": "",
198
+ "description": ""
199
+ },
200
+ "summary": {
201
+ "minMs": 41.100000001490116,
202
+ "medianMs": 41.29999999701977,
203
+ "meanMs": 41.3,
204
+ "p95Ms": 41.5,
205
+ "maxMs": 41.5
206
+ },
207
+ "messages": [],
208
+ "validation": {
209
+ "sampleCount": 6144,
210
+ "meanAbsoluteError": 0.0000011096847932397698,
211
+ "rootMeanSquaredError": 0.0000018071588418628667,
212
+ "maxAbsoluteError": 0.000013589859008789062,
213
+ "passed": true,
214
+ "thresholds": {
215
+ "maxMeanError": 0.0001,
216
+ "maxAbsoluteError": 0.001
217
+ }
218
+ }
219
+ },
220
+ {
221
+ "label": "WGSL FP16",
222
+ "bundle": "current",
223
+ "baseline": false,
224
+ "precision": "fp16",
225
+ "initializationMs": 23.5,
226
+ "timesMs": [
227
+ 31.200000002980232,
228
+ 31.299999997019768,
229
+ 31.399999998509884,
230
+ 31.399999998509884,
231
+ 31.200000002980232
232
+ ],
233
+ "executionProfile": {
234
+ "totalMs": 30.727957000000004,
235
+ "layers": [
236
+ {
237
+ "id": "input-pack",
238
+ "durationMs": 0.04383
239
+ },
240
+ {
241
+ "id": "enc_conv1a",
242
+ "durationMs": 0.736455
243
+ },
244
+ {
245
+ "id": "pool1",
246
+ "durationMs": 4.136372
247
+ },
248
+ {
249
+ "id": "enc_conv2a",
250
+ "durationMs": 1.513117
251
+ },
252
+ {
253
+ "id": "pool2",
254
+ "durationMs": 2.205823
255
+ },
256
+ {
257
+ "id": "enc_conv3a",
258
+ "durationMs": 0.762245
259
+ },
260
+ {
261
+ "id": "pool3",
262
+ "durationMs": 1.01298
263
+ },
264
+ {
265
+ "id": "enc_conv4a",
266
+ "durationMs": 0.357895
267
+ },
268
+ {
269
+ "id": "pool4",
270
+ "durationMs": 0.588173
271
+ },
272
+ {
273
+ "id": "enc_conv5a",
274
+ "durationMs": 0.195989
275
+ },
276
+ {
277
+ "id": "enc_conv5b",
278
+ "durationMs": 0.252401
279
+ },
280
+ {
281
+ "id": "dec_conv4a",
282
+ "durationMs": 0.971607
283
+ },
284
+ {
285
+ "id": "dec_conv4b",
286
+ "durationMs": 0.542633
287
+ },
288
+ {
289
+ "id": "dec_conv3a",
290
+ "durationMs": 1.742476
291
+ },
292
+ {
293
+ "id": "dec_conv3b",
294
+ "durationMs": 0.985274
295
+ },
296
+ {
297
+ "id": "dec_conv2a",
298
+ "durationMs": 3.19568
299
+ },
300
+ {
301
+ "id": "dec_conv2b",
302
+ "durationMs": 2.386271
303
+ },
304
+ {
305
+ "id": "dec_conv1a",
306
+ "durationMs": 4.708088
307
+ },
308
+ {
309
+ "id": "dec_conv1b",
310
+ "durationMs": 4.141663
311
+ },
312
+ {
313
+ "id": "dec_conv1c",
314
+ "durationMs": 0.248985
315
+ }
316
+ ]
317
+ },
318
+ "runtimeInfo": {
319
+ "configuredEngine": "wgsl",
320
+ "gpuEngine": "wgsl",
321
+ "precision": "fp16",
322
+ "model": "oidn-unet-large-v1",
323
+ "modelFamily": "oidn-unet-large",
324
+ "inputChannels": 9,
325
+ "dynamicTile": {
326
+ "enabled": false,
327
+ "currentTileSize": 512,
328
+ "minTileSize": 256,
329
+ "maxTileSize": 512,
330
+ "targetTileTimeMs": 16
331
+ },
332
+ "lastExecution": {
333
+ "width": 512,
334
+ "height": 512,
335
+ "tileWidth": 512,
336
+ "tileHeight": 512,
337
+ "tileCount": 1,
338
+ "durationMs": 32.29999999701977,
339
+ "tileTimeMs": {
340
+ "min": 32.29999999701977,
341
+ "median": 32.29999999701977,
342
+ "mean": 32.29999999701977,
343
+ "max": 32.29999999701977
344
+ }
345
+ }
346
+ },
347
+ "supportsFP16": true,
348
+ "adapter": {
349
+ "vendor": "apple",
350
+ "architecture": "metal-3",
351
+ "device": "",
352
+ "description": ""
353
+ },
354
+ "summary": {
355
+ "minMs": 31.200000002980232,
356
+ "medianMs": 31.299999997019768,
357
+ "meanMs": 31.3,
358
+ "p95Ms": 31.399999998509884,
359
+ "maxMs": 31.399999998509884
360
+ },
361
+ "messages": [],
362
+ "validation": {
363
+ "sampleCount": 6144,
364
+ "meanAbsoluteError": 0.0006845713796792552,
365
+ "rootMeanSquaredError": 0.001048555265853176,
366
+ "maxAbsoluteError": 0.00777888298034668,
367
+ "passed": true,
368
+ "thresholds": {
369
+ "maxMeanError": 0.005,
370
+ "maxAbsoluteError": 0.05
371
+ }
372
+ }
373
+ }
374
+ ]
375
+ }
@@ -0,0 +1,47 @@
1
+ # oidn-web benchmark
2
+
3
+ - Current: `5d9c1c8771e2a03c90bfadafec4b5dd28fada446`
4
+ - TFJS baseline: `136c00c34aa5cf4561b4137034dbd643177f0a5f`
5
+ - Input: 512x512, fixed tile 512, 5 runs after 1 warmup(s)
6
+ - Adapter: apple
7
+
8
+ | Runtime | Init ms | Median ms | P95 ms | Speedup | Precision |
9
+ | --- | ---: | ---: | ---: | ---: | --- |
10
+ | TFJS (136c00c) | 9.10 | 35.00 | 35.10 | 1.00x | fp32 |
11
+ | WGSL FP32 | 348.50 | 41.30 | 41.50 | 0.85x | fp32 |
12
+ | WGSL FP16 | 23.50 | 31.30 | 31.40 | 1.12x | 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 | 6.85e-4 | 1.05e-3 | 7.78e-3 | 6144 |
22
+
23
+ ## GPU hot layers
24
+
25
+ ### WGSL FP32
26
+
27
+ Profiled GPU total: 40.57 ms
28
+
29
+ | Node | GPU ms |
30
+ | --- | ---: |
31
+ | dec_conv1a | 7.83 |
32
+ | dec_conv2a | 5.14 |
33
+ | enc_conv1b | 4.52 |
34
+ | dec_conv1b | 4.45 |
35
+ | dec_conv3a | 2.69 |
36
+
37
+ ### WGSL FP16
38
+
39
+ Profiled GPU total: 30.73 ms
40
+
41
+ | Node | GPU ms |
42
+ | --- | ---: |
43
+ | dec_conv1a | 4.71 |
44
+ | dec_conv1b | 4.14 |
45
+ | pool1 | 4.14 |
46
+ | dec_conv2a | 3.20 |
47
+ | dec_conv2b | 2.39 |