豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Windows support#284

Open
tori29umai0123 wants to merge 4 commits intodeepseek-ai:mainfrom
tori29umai0123:windows-support
Open

Windows support#284
tori29umai0123 wants to merge 4 commits intodeepseek-ai:mainfrom
tori29umai0123:windows-support

Conversation

@tori29umai0123
Copy link
Copy Markdown

Summary

This PR adds Windows/MSVC build support for DeepGEMM while maintaining full compatibility with existing Linux/GCC
builds.

Changes

MSVC Compatibility Layer

  • Add csrc/utils/msvc_compat.hpp with POSIX compatibility macros (popen, pclose, WEXITSTATUS)
  • Add DG_MSVC preprocessor macro for platform-conditional compilation

Code Fixes for MSVC

  • Convert C++20 designated initializers to positional brace initialization (MSVC requires aggregate types)
  • Fix std::filesystem::path handling (use .string() for conversions, as c_str() returns wchar_t* on Windows)
  • Add .exe suffix for Windows executables (nvcc.exe, cuobjdump.exe)

Build System

  • Update setup.py with Windows-specific compiler flags (/std:c++latest, /O2, /EHsc, etc.)
  • Add cuBLASLt and cuBLAS library linking
  • Fix wheel platform tag (lowercase win_amd64)
  • Fix wheel filename format to comply with PEP 427

Documentation

  • Add Windows build instructions to README.md

Testing

  • Successfully built on Windows 11 with:
    • Visual Studio 2022 (MSVC 14.43)
    • CUDA Toolkit 12.8
    • PyTorch 2.10
    • Python 3.10

Notes

  • All changes use conditional compilation to preserve Linux/GCC compatibility
  • No changes to kernel code or CUDA device code

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