fold-capable shapes (44): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 21, 22, 23, 24, 25, 26, 27, 30, 32, 33, 34, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73]
refused (TILE_N % 128 != 0): [31, 35, 36, 37, 41]
  REFUSAL s31 TILE_N=64: PASS -- shape_id 31 has TILE_N=64; a 128-wide output Hadamard group would cross blocks, so the fol

  out_proj k=6144 n=5120  oracle M=256 shape s0
    arm UNFUSED (gemm + had_r_128 pass) rel vs fp32 oracle 1.2932e-02
    arm FOLDED  (had in the epilogue)   rel vs fp32 oracle 1.2932e-02
    control no-transform                rel vs fp32 oracle 1.3838e+00
    control no-svh    (folded arm vs the un-post-scaled oracle) 1.4449e+00
    control misgrouped(folded arm vs the 64-shifted oracle)     1.4175e+00
    M=1      bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=17     bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=63     bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=256    bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=1000   bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=2048   bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True

  gate_proj k=5120 n=17408  oracle M=256 shape s0
    arm UNFUSED (gemm + had_r_128 pass) rel vs fp32 oracle 1.2348e-02
    arm FOLDED  (had in the epilogue)   rel vs fp32 oracle 1.2348e-02
    control no-transform                rel vs fp32 oracle 1.4109e+00
    control no-svh    (folded arm vs the un-post-scaled oracle) 1.4123e+00
    control misgrouped(folded arm vs the 64-shifted oracle)     1.4115e+00
    M=1      bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=17     bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=63     bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=256    bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=1000   bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True
    M=2048   bit-identical to the unfused pass on all 44 shapes: True  |  identical ACROSS shapes: True

  shared memory the launcher asked for (fold arm) vs the mainloop's own need:
    s0   (128, 128, 64, 2, 4, 3, 1)   fold  36864 B   mainloop  36864 B   grew: False
    s1   (256, 128, 64, 2, 4, 3, 1)   fold  61440 B   mainloop  61440 B   grew: False
    s2   (160, 128, 64, 2, 4, 3, 1)   fold  43008 B   mainloop  43008 B   grew: False
    s3   (64, 128, 64, 2, 4, 3, 1)    fold  24576 B   mainloop  24576 B   grew: False
    s4   (256, 128, 64, 4, 2, 3, 1)   fold  61440 B   mainloop  61440 B   grew: False
    s5   (128, 256, 64, 2, 4, 3, 1)   fold  49152 B   mainloop  49152 B   grew: False
    s6   (256, 128, 32, 2, 4, 4, 1)   fold  40960 B   mainloop  40960 B   grew: False
    s7   (128, 128, 128, 2, 4, 2, 1)  fold  49152 B   mainloop  49152 B   grew: False
    s8   (128, 256, 64, 1, 8, 3, 1)   fold  49152 B   mainloop  49152 B   grew: False
    s9   (64, 256, 64, 1, 8, 3, 3)    fold  36864 B   mainloop  36864 B   grew: False
    s10  (128, 128, 64, 1, 4, 3, 1)   fold  36864 B   mainloop  36864 B   grew: False
    s11  (128, 256, 64, 1, 8, 3, 4)   fold  49152 B   mainloop  49152 B   grew: False
    s12  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s13  (256, 256, 64, 1, 8, 3, 1)   fold  73728 B   mainloop  73728 B   grew: False
    s20  (128, 128, 64, 2, 4, 3, 4)   fold  36864 B   mainloop  36864 B   grew: False
    s21  (128, 128, 64, 2, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s22  (256, 128, 64, 2, 4, 3, 4)   fold  61440 B   mainloop  61440 B   grew: False
    s23  (256, 128, 64, 2, 4, 3, 8)   fold  61440 B   mainloop  61440 B   grew: False
    s24  (128, 128, 128, 2, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s25  (256, 128, 64, 2, 4, 3, 16)  fold  61440 B   mainloop  61440 B   grew: False
    s26  (128, 128, 128, 2, 4, 2, 4)  fold  49152 B   mainloop  49152 B   grew: False
    s27  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s30  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s32  (128, 128, 64, 1, 8, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s33  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s34  (64, 128, 64, 1, 4, 2, 8)    fold  16384 B   mainloop  16384 B   grew: False
    s50  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s51  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s52  (128, 128, 64, 1, 8, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s53  (128, 128, 128, 1, 4, 3, 8)  fold  73728 B   mainloop  73728 B   grew: False
    s54  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s60  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s61  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s62  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s63  (128, 128, 64, 1, 8, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s64  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s65  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s66  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s67  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s68  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s70  (128, 128, 128, 1, 4, 2, 8)  fold  49152 B   mainloop  49152 B   grew: False
    s71  (128, 128, 64, 1, 4, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False
    s72  (128, 128, 64, 1, 4, 3, 8)   fold  36864 B   mainloop  36864 B   grew: False
    s73  (128, 128, 64, 1, 8, 2, 8)   fold  24576 B   mainloop  24576 B   grew: False

GATE 5 OUTPUT-HAD FOLD: PASS
