Skip to content

Commit 149542a

Browse files
committed
Something impacting the logic for blockDimensions.C == 48 on iOS 26.1
1 parent c8a71f3 commit 149542a

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/nnc/mfa/v2/NAAttentionDescriptor.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,7 @@ NAAttentionKernelDescriptor NAAttentionDescriptor::kernelDescriptor(MTL::Device
5252
} else if (matrixDimensions[1] % 48 == 0) {
5353
return simd::ushort3 { 16, 48, revisedHead };
5454
}
55-
// Prefer no trailing involved, so the compute is more evenly distributed.
56-
if (matrixDimensions[1] % 128 > 64 && matrixDimensions[1] % 96 < 48) {
57-
return simd::ushort3 { 16, 64, revisedHead };
58-
} else if (matrixDimensions[1] % 128 < 64 && matrixDimensions[1] % 96 > 48) {
59-
return simd::ushort3 { 16, 48, revisedHead };
60-
}
61-
// If we have to use matrix multiplication, calculate how much wasted compute we are going to be with.
62-
const unsigned short remainder64 = matrixDimensions[1] % 64;
63-
const unsigned short remainder48 = matrixDimensions[1] % 48;
64-
if (remainder64 * 48 < remainder48 * 64) {
65-
return simd::ushort3 { 16, 48, revisedHead };
66-
} else {
67-
return simd::ushort3 { 16, 64, revisedHead };
68-
}
55+
return simd::ushort3 { 16, 64, revisedHead };
6956
};
7057
auto createExecutionSIMDGroups =
7158
[=]() -> uint16_t {

0 commit comments

Comments
 (0)