Skip to content

Commit 4c07dd1

Browse files
committed
Update on "[EK-VT] Adding a workgroup class to VecUtils"
This diff adds a new class called `WorkgroupSize` to the `VecUtils` header file. The `WorkgroupSize` class takes three `uint32_t` values as parameters and stores them in a single `uint32_t` variable using bitwise operations. This class is used in the Vulkan backend to specify the size of a workgroup for a given operation. Differential Revision: [D70021019](https://our.internmc.facebook.com/intern/diff/D70021019/) [ghstack-poisoned]
1 parent 7d61d58 commit 4c07dd1

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)