PowerSGD (torch/distributed/algorithms/ddp_comm_hooks/powerSGD_hook.py) orthogonalization on A100-SXM4-80GB, torch 2.7.1, FP32 highest.
torch = psh._orthogonalize (batched Householder QR for rank>2 in FP32); GS = psh._orthogonalize_gram_schmidt (per-column Python loop,
used for rank<=2 and for fp16/bf16). cqr2/scqr3 = cholqr compiled (fullgraph, dynamic=False). ms per call, mean of 50.

b x n x r | torch | GS fp32 | GS bf16 | cqr2 | scqr3 | cqr2 speedup vs torch
 1x768x4   |  0.171 |  0.371 |  0.367 |  0.806 |  1.088 |   0.2x
 1x768x8   |  0.168 |  0.776 |  0.769 |  0.924 |  1.134 |   0.2x
 1x768x16  |  0.221 |  1.607 |  1.633 |  0.831 |  1.193 |   0.3x
 1x768x32  |  0.289 |  3.268 |  3.221 |  0.840 |  1.135 |   0.3x
 1x768x64  |  0.484 |  6.465 |  6.448 |  0.787 |  1.093 |   0.6x
 1x3072x4   |  0.193 |  0.376 |  0.370 |  0.778 |  1.085 |   0.2x
 1x3072x8   |  0.178 |  0.769 |  0.929 |  0.812 |  1.127 |   0.2x
 1x3072x16  |  0.277 |  1.578 |  1.677 |  0.815 |  1.127 |   0.3x
 1x3072x32  |  0.473 |  3.144 |  3.331 |  0.811 |  1.110 |   0.6x
 1x3072x64  |  0.870 |  6.530 |  6.410 |  0.775 |  1.073 |   1.1x
12x768x4   |  1.354 |  0.367 |  0.366 |  0.798 |  1.058 |   1.7x
12x768x8   |  1.483 |  0.785 |  0.777 |  0.796 |  1.115 |   1.9x
12x768x16  |  1.946 |  1.571 |  1.565 |  0.817 |  1.121 |   2.4x
12x768x32  |  2.502 |  3.241 |  3.181 |  0.860 |  1.274 |   2.9x
12x768x64  |  4.420 |  6.318 |  6.319 |  0.849 |  1.168 |   5.2x
12x3072x4   |  0.984 |  0.371 |  0.369 |  1.265 |  2.304 |   0.8x
12x3072x8   |  1.423 |  0.803 |  0.792 |  1.278 |  1.914 |   1.1x
12x3072x16  |  2.384 |  1.690 |  1.623 |  1.303 |  2.375 |   1.8x
12x3072x32  |  4.300 |  3.271 |  3.248 |  1.373 |  2.055 |   3.1x
12x3072x64  |  8.197 |  6.815 |  7.120 |  1.536 |  2.297 |   5.3x

Overhead floor (cqr2): eager / compiled / compiled mode="reduce-overhead" (CUDA graphs); cholesky_ex alone; triangular inverse alone
1x768x8:   torch 0.168 | eager 0.984 | compiled 0.826 | cudagraph 0.239 | cholesky_ex 0.045 | tri-inverse 0.047
1x3072x32: torch 0.475 | eager 1.022 | compiled 0.858 | cudagraph 0.211 | cholesky_ex 0.045 | tri-inverse 0.048
12x768x16: torch 2.278 | eager 0.990 | compiled 0.840 | cudagraph 0.496 | cholesky_ex 0.040 | tri-inverse 0.047
12x3072x32: torch 4.251 | eager 1.651 | compiled 1.372 | cudagraph 1.339 | cholesky_ex 0.050 | tri-inverse 0.048

Conditioning in real training: DDP world_size=1 with the real powerSGD_hook (start_powerSGD_iter=10, warm start, error feedback,
min_compression_rate=1), 6-layer pre-LN transformer d=384, char-level tinyshakespeare, AdamW 3e-4, 400 steps, sampled every 10 steps.
rank 4:  final loss 2.387 | cond over 2106 calls: median 2.7e+00, 99% 1.5e+01, max 6.9e+01
   worst cond 6.9e+01 (1,384,4): orth torch 1.6e-07 cqr2 6.8e-07 scqr3 5.3e-07
rank 32: final loss 2.276 | cond over 2106 calls: median 2.9e+01, 99% 2.1e+02, max 1.9e+03
   worst cond 1.9e+03 (1,384,32): orth torch 8.9e-07 cqr2 7.6e-07 scqr3 6.5e-07

Eager CholeskyQR2 drop-in (repro_powersgd_orth.py; FP32 compute, column scaling, cholesky_ex + per-matrix fallback, one host sync):
b x n x r | dtype | current _orthogonalize (ms) | CholeskyQR2 (ms) | speedup | orth current | orth CQR2
1x768x4 | float32  |   0.180 |   0.852 |   0.2x | 3.5e-07 | 6.2e-07
1x768x32 | float32  |   0.294 |   0.855 |   0.3x | 8.3e-07 | 5.0e-07
1x3072x64 | float32  |   0.871 |   0.893 |   1.0x | 1.3e-06 | 9.7e-07
12x768x16 | float32  |   2.063 |   0.812 |   2.5x | 7.4e-07 | 1.5e-06
12x3072x32 | float32  |   4.300 |   1.616 |   2.7x | 9.8e-07 | 4.8e-06
12x3072x64 | float32  |   8.207 |   1.877 |   4.4x | 1.4e-06 | 6.8e-06
1x768x4 | bfloat16 |   0.452 |   0.876 |   0.5x | 4.8e-03 | 4.1e-04
1x768x32 | bfloat16 |   3.266 |   0.886 |   3.7x | 1.4e-02 | 2.9e-03
1x3072x64 | bfloat16 |   6.518 |   0.866 |   7.5x | 2.5e-02 | 2.7e-03
12x768x16 | bfloat16 |   1.707 |   0.873 |   2.0x | 1.3e-02 | 1.6e-03
12x3072x32 | bfloat16 |   3.439 |   1.649 |   2.1x | 1.8e-02 | 1.6e-03
12x3072x64 | bfloat16 |   6.701 |   1.906 |   3.5x | 2.6e-02 | 2.9e-03

With an "upcast to fp32 + existing QR path" column (upcast included):
b x n x r | dtype | current _orthogonalize | fp32 QR on upcast copy | CholeskyQR2 (ms) | orth current | orth upcast | orth CQR2
1x768x4 | float32  |   0.183 |   0.152 |   0.839 | 1.7e-07 | 1.7e-07 | 6.4e-07
1x768x32 | float32  |   0.291 |   0.287 |   0.849 | 7.8e-07 | 7.8e-07 | 4.2e-07
1x3072x64 | float32  |   0.873 |   0.710 |   0.833 | 1.2e-06 | 1.2e-06 | 9.5e-07
12x768x16 | float32  |   1.857 |   1.850 |   0.821 | 7.6e-07 | 7.6e-07 | 1.7e-06
12x3072x32 | float32  |   4.297 |   4.236 |   1.622 | 1.0e-06 | 1.0e-06 | 4.8e-06
12x3072x64 | float32  |   8.206 |   8.186 |   1.861 | 1.5e-06 | 1.5e-06 | 6.6e-06
1x768x4 | bfloat16 |   0.380 |   0.171 |   0.885 | 5.1e-03 | 4.8e-04 | 4.8e-04
1x768x32 | bfloat16 |   3.251 |   0.242 |   0.887 | 1.7e-02 | 2.9e-03 | 2.9e-03
1x3072x64 | bfloat16 |   6.570 |   0.715 |   0.866 | 2.7e-02 | 2.8e-03 | 2.8e-03
12x768x16 | bfloat16 |   1.605 |   1.858 |   0.874 | 1.3e-02 | 1.8e-03 | 1.8e-03
12x3072x32 | bfloat16 |   3.337 |   4.244 |   1.654 | 1.7e-02 | 1.6e-03 | 1.6e-03
12x3072x64 | bfloat16 |   6.739 |   8.206 |   1.906 | 2.6e-02 | 2.9e-03 | 2.9e-03
