You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing a bug I wrote, but in my defense the bug was in the code I copied. 😛
This change decreases the size of our staging `StorageBuffer`s which were previously bigger than necessary.
There's a few numbers describing size at play:
```
numel -> CPU buffer
nbytes -> numel * cpu_dtype
gpu_numel -> GPU texture
gpu_nbytes -> gpu_numel * gpu_dtype
```
Firstly, `StorageBuffer`'s ctor takes `numel` not `nbytes`. Secondly, we should use the CPU size not the GPU size which may be aligned up to a multiple of 4.
Differential Revision: [D55619076](https://our.internmc.facebook.com/intern/diff/D55619076/)
ghstack-source-id: 220995380
Pull Request resolved: #2811
0 commit comments