mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
Fix output Float32Array size in webgpu export (#2096)
This commit is contained in:
parent
01b98b7f42
commit
2b5ea7d9cb
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ const setupNet = async (device, safetensor) => {{
|
|||
device.queue.submit([gpuCommands]);
|
||||
|
||||
await gpuReadBuffer.mapAsync(GPUMapMode.READ);
|
||||
const resultBuffer = new Float32Array(gpuReadBuffer.size);
|
||||
const resultBuffer = new Float32Array(gpuReadBuffer.size/4);
|
||||
resultBuffer.set(new Float32Array(gpuReadBuffer.getMappedRange()));
|
||||
gpuReadBuffer.unmap();
|
||||
return resultBuffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue