]> zoso.dev Git - nano-pow.git/commitdiff
Reduce workgroup size to 64 and update comments with reasoning. next/fixups
authorChris Duncan <chris@zoso.dev>
Tue, 22 Apr 2025 21:17:11 +0000 (14:17 -0700)
committerChris Duncan <chris@zoso.dev>
Tue, 22 Apr 2025 21:17:11 +0000 (14:17 -0700)
src/lib/gpu/compute.wgsl

index ba1450190af3d16f1ce2216ff18568dfe4e3bf51..e06df02425009b9313d23b274e6d402569908c33 100644 (file)
@@ -139,13 +139,12 @@ var<workgroup> m4: vec2<u32>;
 
 /**
 * Search compute function
-* Calls main with a workgroup size of 96 which in testing was the lowest value
-* that would saturate the GPU active thread count and warp occupancy which
-* provides a decent balance with the power-sensitive requirements of mobile
+* Calls main with a workgroup size of 64 which balances warps between NVIDIA and
+* AMD cards while still considering the power-sensitive requirements of mobile
 * devices. The entire workgroup exits immediately if a nonce was already found
 * by a previous workgroup.
 */
-@compute @workgroup_size(96)
+@compute @workgroup_size(64)
 fn search(@builtin(global_invocation_id) global_id: vec3<u32>, @builtin(local_invocation_id) local_id: vec3<u32>) {
        if (local_id.x == 0u) {
                found = atomicLoad(&work.found) != 0u;