onnxruntime/js/web/lib/wasm/jsep
Yulong Wang 50e6235af1
[js/web] allow ShaderHelper to use internal (non-I/O) variables (#18525)
### Description
This PR includes a change that inspired from #18452 to resolve a
requirement: a shader may depend on an instance of `IndicesHelper` to
generate WGSL code snippet, but the IndicesHelper instance is not
necessarily an input/output of the program. So the existing
`declareVariables()` function does not work with this scenario.

In order to support this requirement, I added this "use" function to
`interface ShaderHelper`, which takes a helper-like object as parameter.
The hidden implementation `ShaderHelperImpl` class will iterate the
helpers and call `impl()` for each.

@axinging @qjia7
2023-11-28 15:15:59 -08:00
..
webgpu [js/web] allow ShaderHelper to use internal (non-I/O) variables (#18525) 2023-11-28 15:15:59 -08:00
backend-webgpu.ts [js/webgpu] Use builtin num_workgroups to fix shader key conflict (#18387) 2023-11-10 17:37:45 -08:00
init.ts [js/webgpu] support using uniform buffer (#17803) 2023-10-10 00:31:12 -07: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