File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments