Developer Tools

trunk/91075883c0dfb4e5221e488983e70a412be397f6: Don't create CPU FlexAttention tests if CPU doesn't support it (#174881)

A critical PyTorch bug was just patched, preventing crashes on specific hardware...

Deep Dive

PyTorch merged a fix for a bug causing CPU FlexAttention tests to fail on systems where the CPU lacks required instruction sets like AVX2, even when CUDA is present. This notably affected Nvidia's Grace Hopper platforms. The patch prevents automatic instantiation of these CPU tests when unsupported, resolving a 'NotImplementedError' and reducing code duplication. The fix follows up on a previous related pull request from earlier development.

Why It Matters

This ensures stable PyTorch performance on cutting-edge hardware like Grace Hopper, crucial for AI researchers and engineers.