Skip to content

Commit

Permalink
[js/web] transfer input buffer back to caller thread (#19677)
Browse files Browse the repository at this point in the history
### Description

When using proxy worker, input buffers should be transferred back to the
caller thread after `run()` call is done.

Fixes #19488
  • Loading branch information
fs-eire authored Mar 1, 2024
1 parent 22176a5 commit f06164e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/proxy-worker/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ self.onmessage = (ev: MessageEvent<OrtWasmMessage>): void => {
} else {
postMessage(
{type, out: outputs} as OrtWasmMessage,
extractTransferableBuffers(outputs as SerializableTensorMetadata[]));
extractTransferableBuffers([...inputs, ...outputs] as SerializableTensorMetadata[]));
}
},
err => {
Expand Down

0 comments on commit f06164e

Please sign in to comment.