Skip to content

fix: Add MSVC support for Windows#846

Open
LAWArthur wants to merge 2 commits into
state-spaces:mainfrom
LAWArthur:main
Open

fix: Add MSVC support for Windows#846
LAWArthur wants to merge 2 commits into
state-spaces:mainfrom
LAWArthur:main

Conversation

@LAWArthur
Copy link
Copy Markdown

Summary

This PR provides a patch to make it ready to use on Windows, while keeping everything intact on other platforms.

What's Changed

pyproject.toml: Add platform-specific triton dependencies, because the triton doesn't provide Windows wheels, however triton-windows is available.

selective_scan_fwd_kernel.cuh and selective_scan_bwd_kernel.cuh:

  • added M_LOG2E constant if not provided
  • fixed non-standard preprocessor usage only supported by GCC

static_switch.h: changed to static constexpr due to MSVC-specific constraints for template params.

Why It's Important

Current code meets a great lot issues when compiling using MSVC on Windows (which is forced by PyTorch) due to specific language features unsupported by MSVC, which makes it a hard time to debug and fix for many.

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