onnxruntime/js/web/lib/wasm/jsep/webgpu
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
..
ops [js/webgpu] Mitigate floating point accuracy issue in Resize (#18956) 2024-01-03 14:15:26 -08:00
attribute-with-cache-key.ts [js] optimize eslint config (#18460) 2023-11-20 12:00:56 -08:00
gpu-data-manager.ts [js/webgpu] support using uniform buffer (#17803) 2023-10-10 00:31:12 -07:00
op-resolve-rules.ts [JS/Web] Added uniforms to Reduce, Resize and Split Ops. (#18727) 2023-12-12 11:12:23 -08:00
program-manager.ts [js/webgpu] Introduce trace support (#18928) 2024-01-03 10:13:17 -08:00
types.ts [js/webgpu] revise uniform support (#17871) 2023-10-11 16:41:46 -07:00