onnxruntime/js/web/lib/wasm/jsep
Jiajie Hu 3b8b9147fa
[js/webgpu] Mitigate floating point accuracy issue in Resize (#18956)
### Description
The patch fixes a floating point accuracy issue in Resize by preferring
integer indices and integer arithmetic where possible.

### Motivation and Context
Model test `test_resize_upsample_sizes_nearest_floor_align_corners` was
observed to be failing on certain platforms. The root cause is the
inaccurate floating point evaluation of 21 / 7 (2.999... vs 3), which
results in the wrong input element to be indexed (floor(2.999...) vs
floor(3)).
2024-01-03 14:15:26 -08:00
..
webgpu [js/webgpu] Mitigate floating point accuracy issue in Resize (#18956) 2024-01-03 14:15:26 -08:00
backend-webgpu.ts [js/webgpu] Introduce trace support (#18928) 2024-01-03 10:13:17 -08:00
init.ts [js/webgpu] fix heap access > 2GB (#18914) 2023-12-27 15:22:05 -08:00
log.ts [js/webgpu] support proxy for webgpu (#15851) 2023-05-15 16:23:13 -07:00
tensor-view.ts [js/web] revise TensorView (#17473) 2023-09-14 21:14:44 -07:00
util.ts [js/webgpu] allow 0 sized tensor for tensor view (#16540) 2023-06-30 12:05:04 -07:00