Skip to content

Commit b8d5774

Browse files
committed
Update base for Update on "[EK-VT] Adding reserve and append functions to SpecVarList"
This diff adds two new functions to the SpecVarList class in the Vulkan runtime library. The first function, reserve, allows the user to reserve a certain amount of space in the SpecVarList before adding any elements. The second function, append, allows the user to add a single SpecVar to the SpecVarList. These functions are useful for optimizing memory usage and improving performance in the Vulkan runtime. Differential Revision: [D70021782](https://our.internmc.facebook.com/intern/diff/D70021782/) [ghstack-poisoned]
1 parent 7d61d58 commit b8d5774

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/vulkan/runtime/utils/VecUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ class WorkgroupSize final {
499499
// shift numbers by multiple of 11 bits, since each local workgroup axis can
500500
// be 1024 at most and which is 0x400. only z axis can't store 1024, because
501501
// it would overflow uint32_t storage.
502-
if (z == 1024) {
502+
if (vec[2u] == 1024) {
503503
throw std::runtime_error(
504504
"Workgroup size in z axis cannot be 1024 because it would overflow uint32_t storage");
505505
}

0 commit comments

Comments
 (0)