onnxruntime/js/web/lib/wasm/jsep
Jiajia Qin d226e40856
[js/webgpu] set query type in onRunStart (#19202)
### Description
<!-- Describe your changes. -->
`env.webgpu.profiling` is a global flag. It may change before each
session.run. So the best place is to update it in `onRunStart` event.
After this, we can directly check `this.queryType`'s value. Without this
pr, we need to make sure that `getCommandEncoder()` is called before
checking `this.queryType`. Otherwise, it may happen that
`pendingKernels`'s length is not equal to `pendingDispatchNumber`'s
length. See the two ugly workarounds
[1)](e630dbf528 (diff-006fc84d3997f96a29b8033bd2075d6a0a9509211bd5812a6b934fc74fedfd9dR267-R268))
and
[2)](e630dbf528 (diff-618fe297fbe7a1da586380163b8fd2627311ccc217640a3c5cdc9c17a33472c1R73-R80))
if we don't introduce `onRunStart`. Or we need to call `setQueryType` in
each kernel run.
2024-01-22 16:08:55 -08:00
..
webgpu [js/webgpu] Add HardSigmoid support (#19215) 2024-01-22 15:53:26 -08:00
backend-webgpu.ts [js/webgpu] set query type in onRunStart (#19202) 2024-01-22 16:08:55 -08:00
init.ts [js/webgpu] Refactor timestamp-query and introduce timestamp-query-inside-passes (#18894) 2024-01-13 00:23:17 -08:00
log.ts
tensor-view.ts [js/web] revise TensorView (#17473) 2023-09-14 21:14:44 -07:00
util.ts