Skip to content

Fix Windows compilation issues for PyTorch 2.10.0#345

Open
gzsiang wants to merge 1 commit intothu-ml:mainfrom
gzsiang:fix-windows-compilation
Open

Fix Windows compilation issues for PyTorch 2.10.0#345
gzsiang wants to merge 1 commit intothu-ml:mainfrom
gzsiang:fix-windows-compilation

Conversation

@gzsiang
Copy link

@gzsiang gzsiang commented Jan 25, 2026

Fix Windows compilation issues for PyTorch 2.10.0

This PR resolves several critical issues when compiling SageAttention on Windows systems:

  1. Fixed std namespace conflict by adding /permissive- MSVC compiler flag
  2. Fixed linking errors with PyTorch 2.1+ versions, especially the c10::MessageLogger constructor compatibility issue
  3. Fixed variable scope error in setup.py
  4. Added Windows-specific compiler flags and linking options

Tested environment:

  • Windows 11
  • PyTorch 2.1.0
  • CUDA 13.0
  • Python 3.13
  • Visual Studio 2022 BuildTools

These modifications don't affect Linux/macOS builds while significantly improving the Windows user experience. Many Windows users will benefit from this fix as Windows represents approximately 25-30% of PyTorch users according to official statistics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant