mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
[js/webgpu] fix RangeError in buffer download (#16165)
### Description this is a following up fix for #15990, which should resolve the RangeError issue.
This commit is contained in:
parent
bf05d4ec26
commit
ebe715a817
1 changed files with 1 additions and 1 deletions
|
|
@ -289,7 +289,7 @@ export class WebGpuBackend {
|
|||
// the underlying buffer may be changed after the async function is called. so we use a getter function to make sure
|
||||
// the buffer is up-to-date.
|
||||
const data = getTargetBuffer();
|
||||
data.set(new Uint8Array(arrayBuffer));
|
||||
data.set(new Uint8Array(arrayBuffer, 0, data.byteLength));
|
||||
}
|
||||
|
||||
alloc(size: number): number {
|
||||
|
|
|
|||
Loading…
Reference in a new issue