mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
[js/webgpu] fix GPU to GPU memcpy (#16393)
### Description Fixes a GPU to GPU memory copy bug which causes #16267
This commit is contained in:
parent
52e2bdf541
commit
da532f3f5a
1 changed files with 4 additions and 1 deletions
|
|
@ -134,8 +134,11 @@ class GpuDataManagerImpl implements GpuDataManager {
|
|||
throw new Error('inconsistent source and destination gpu data size');
|
||||
}
|
||||
const size = calcNormalizedBufferSize(sourceGpuDataCache.originalSize);
|
||||
|
||||
// GPU copy
|
||||
this.backend.getCommandEncoder().copyBufferToBuffer(
|
||||
const commandEncoder = this.backend.getCommandEncoder();
|
||||
this.backend.endComputePass();
|
||||
commandEncoder.copyBufferToBuffer(
|
||||
sourceGpuDataCache.gpuData.buffer, 0, destinationGpuDataCache.gpuData.buffer, 0, size);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue