Skip to content

[CK][Windows]: fmha_fwd_head_grouping guard posix headers and use of posix only functions on Windows#5979

Closed
astrelsky wants to merge 1 commit intoROCm:developfrom
astrelsky:users/astrelsky/windows_fmha_fwd_head_grouping
Closed

[CK][Windows]: fmha_fwd_head_grouping guard posix headers and use of posix only functions on Windows#5979
astrelsky wants to merge 1 commit intoROCm:developfrom
astrelsky:users/astrelsky/windows_fmha_fwd_head_grouping

Conversation

@astrelsky
Copy link
Copy Markdown
Contributor

@astrelsky astrelsky commented Mar 29, 2026

Motivation

The purpose is to fix the build errors when compiling for Windows when fmha_fwd_head_grouping.hpp is included.

Technical Details

This checks if _WIN32 is defined and prevents including posix headers and use of posix functions. There is currently no way to get the L3 cache size. If the architecture is not one of the ones currently hardcoded with the L3 cache size, it will return the default error value.

Test Plan

Tested locally building flash-attention with CK on Windows. (See comments here Dao-AILab/flash-attention#2400 (comment))

Test Result

Builds successfully only when using setuptools that include the distutils patch here pypa/distutils#406

Submission Checklist

@Snektron @0xDELUXA

@0xDELUXA
Copy link
Copy Markdown

0xDELUXA commented Mar 29, 2026

Looking forward to this being merged, as CK is supported on Windows, but this PR introduced Linux-only components. Applying the changes from this PR on Windows is necessary to maintain compatibility.

@brockhargreaves-amd
Copy link
Copy Markdown
Contributor

Duplicate of #5977

@brockhargreaves-amd brockhargreaves-amd marked this as a duplicate of #5977 Mar 29, 2026
@0xDELUXA
Copy link
Copy Markdown

Duplicate of #5977

Sorry, we didn’t notice #5977.

@astrelsky
Copy link
Copy Markdown
Contributor Author

Duplicate of #5977

Yup I didn't notice it.

@astrelsky astrelsky closed this Mar 29, 2026
@brockhargreaves-amd
Copy link
Copy Markdown
Contributor

Duplicate of #5977

Sorry, we didn’t notice #5977.

No worries, thank you for the contribution none the less!

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

Labels

external contribution Code contribution from users community.. project: composablekernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants