mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
[js/webgpu] Fix the undefined push error (#19366)
### Description This PR fixes below errors when enable webgpu profiling: ``` TypeError: Cannot read properties of undefined (reading 'push') ```
This commit is contained in:
parent
9139bdda02
commit
efc17e79de
1 changed files with 4 additions and 2 deletions
|
|
@ -530,8 +530,10 @@ export class WebGpuBackend {
|
||||||
};
|
};
|
||||||
this.pendingKernels.push(pendingKernelInfo);
|
this.pendingKernels.push(pendingKernelInfo);
|
||||||
|
|
||||||
const sessionPendingKernels = this.capturedPendingKernels.get(this.currentSessionId!);
|
if (this.sessionStatus === 'capturing') {
|
||||||
sessionPendingKernels!.push(pendingKernelInfo);
|
const sessionPendingKernels = this.capturedPendingKernels.get(this.currentSessionId!);
|
||||||
|
sessionPendingKernels!.push(pendingKernelInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.programManager.run(artifact, inputDatas, outputDatas, normalizedDispatchGroup, uniformBufferBinding);
|
this.programManager.run(artifact, inputDatas, outputDatas, normalizedDispatchGroup, uniformBufferBinding);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue