onnxruntime/js/web/test
Jiajia Qin 8a12b2cea6
[js/webgpu] Fix the transpose error when dims > 4D (#18027)
### Description
<!-- Describe your changes. -->
Currently, the uniform support has bugs when dims rank is larger than 4.
See https://github.com/microsoft/onnxruntime/issues/17860 item 1.
So this PR only enables shapes uniforms when shape rank is <= 4 for
transpose. Otherwise, below compilation errors are thrown:
```
1 error(s) generated while compiling the shader:
:3:50 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'u32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead.
      struct Uniforms { output_size:u32, a_shape:array<u32, 5>, a_strides:array<u32, 5>, output_shape:array<u32, 5>, output_strides:array<u32, 5> };
                                                 ^^^^^^^^^^^^^

:3:7 note: see layout of struct:
/*            align(4) size(84) */ struct Uniforms {
/* offset( 0) align(4) size( 4) */   output_size : u32;
/* offset( 4) align(4) size(20) */   a_shape : array<u32, 5>;
/* offset(24) align(4) size(20) */   a_strides : array<u32, 5>;
/* offset(44) align(4) size(20) */   output_shape : array<u32, 5>;
/* offset(64) align(4) size(20) */   output_strides : array<u32, 5>;
/*                              */ };
      struct Uniforms { output_size:u32, a_shape:array<u32, 5>, a_strides:array<u32, 5>, output_shape:array<u32, 5>, output_strides:array<u32, 5> };
      ^^^^^^

:4:42 note: 'Uniforms' used in address space 'uniform' here
      @group(0) @binding(2) var<uniform> uniforms: Uniforms;
                                         ^^^^^^^^
```
2023-10-23 11:02:19 -07:00
..
data/ops [js/webgpu] Fix the transpose error when dims > 4D (#18027) 2023-10-23 11:02:19 -07:00
e2e [js/web] enable webgpu in browser unit test (#16310) 2023-08-08 11:45:04 -07:00
unittests [js] upgrade async@3.2.3 /js/ (#11421) 2022-05-03 23:41:36 -07:00
op-test-schema.json [js/web] allow optional input/output in operator test (#17184) 2023-08-16 11:50:11 -07:00
suite-test-list.jsonc [js/webgpu] Support where (#17544) 2023-10-03 14:28:21 -07:00
test-main.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
test-runner.ts [js/webgpu] support IO binding (#17480) 2023-09-29 11:24:42 -07:00
test-shared.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
test-types.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00