mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
### 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; ^^^^^^^^ ``` |
||
|---|---|---|
| .. | ||
| _example.jsonc | ||
| abs-int32.jsonc | ||
| abs.jsonc | ||
| absr.jsonc | ||
| abss.jsonc | ||
| acos.jsonc | ||
| add.jsonc | ||
| add_int32.jsonc | ||
| and.jsonc | ||
| asin.jsonc | ||
| bias-add.jsonc | ||
| bias-split-gelu.jsonc | ||
| cast.jsonc | ||
| ceil.jsonc | ||
| concat.jsonc | ||
| concat_int32.jsonc | ||
| conv-transpose.jsonc | ||
| conv.jsonc | ||
| cos.jsonc | ||
| depth-to-space.jsonc | ||
| div.jsonc | ||
| div_int32.jsonc | ||
| einsum.jsonc | ||
| equal.jsonc | ||
| exp.jsonc | ||
| expand.jsonc | ||
| floor.jsonc | ||
| gather-elements.jsonc | ||
| gather.jsonc | ||
| gelu.jsonc | ||
| gemm.jsonc | ||
| global-average-pool.jsonc | ||
| greater.jsonc | ||
| identity.jsonc | ||
| image-scaler.jsonc | ||
| instance-norm.jsonc | ||
| layer-norm.jsonc | ||
| leaky-relu.jsonc | ||
| less.jsonc | ||
| log.jsonc | ||
| matmul-broadcast.jsonc | ||
| matmul.jsonc | ||
| mul.jsonc | ||
| mul_int32.jsonc | ||
| neg-int32.jsonc | ||
| neg.jsonc | ||
| not.jsonc | ||
| or.jsonc | ||
| pad-big.jsonc | ||
| pad.jsonc | ||
| pow-big-number.jsonc | ||
| pow.jsonc | ||
| pow_int32.jsonc | ||
| reduce-min.jsonc | ||
| relu.jsonc | ||
| reshape-int32.jsonc | ||
| reshape-pack.jsonc | ||
| reshape.jsonc | ||
| resize-pack.jsonc | ||
| shape.jsonc | ||
| sin.jsonc | ||
| skip-layer-norm.jsonc | ||
| slice.jsonc | ||
| softmax.jsonc | ||
| split.jsonc | ||
| sqrt.jsonc | ||
| sub.jsonc | ||
| sub_int32.jsonc | ||
| tan.jsonc | ||
| tile.jsonc | ||
| transpose.jsonc | ||
| transpose_int32_uint32.jsonc | ||
| upsample.jsonc | ||
| where.jsonc | ||
| where_broadcast.jsonc | ||
| xor.jsonc | ||