viable/strict/1789757464: [Windows] Fix FlashAttention CUDA build with MSVC C++20 (#197382)
- PyTorch: 1156 events in the last 90 days
- PyTorch: 1142th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1789753839: [MPS] Guard MPP attention include on header availability (#196104)
What happened
Summary Follow-up to #186343 , which enables the native FlashAttention SDPA backend for Windows CUDA builds. MSVC implicitly enables /permissive- when compiling as C++20 with CTK13.4. This triggers a CUTLASS/CuTe template parsing failure ( C3545 ) while compiling the FlashAttention CUDA kernels. Pass /permissive only to CUDA sources in the flash_attention target, leaving conformance settings for the rest of PyTorch…
Summary assembled by rule from the sources below