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
## Context
Recently #7015 was implemented so that all tensor metadata (e.g. sizes, strides) would be stored in a single UBO instead of with separate UBO objects. This helps with memory savings presumably due to defragmentation of memory allocations.
However, once the change was introduced, I noticed two new warnings produced by the Vulkan Validation Layer.
The first complains that the offset of a UBO descriptor is not a multiple of the `minUniformBufferOffsetAlignment` field reported by the physical device properties.
The second complains that the range of a UBO descriptor exceeds the offset + range of the underlying UBO object.
# Solution
To address the first one, instead of using `sizeof(utils::ivec4)` to determine the offset per metadata field, check the `minUniformBufferOffsetAlignment` field of reported by the device and use that instead.
The second warning arises because the logic in the constructor of `BufferBindInfo` had a mistake; instead of using the range of the underlying UBO object, it should use the range subtracted by the user specified offset.
Differential Revision: [D67770792](https://our.internmc.facebook.com/intern/diff/D67770792/)
ghstack-source-id: 260031110
Pull Request resolved: #7480
0 commit comments