From d6d78d9dfc4314f31286d88e078a83cdee3dcd7c Mon Sep 17 00:00:00 2001 From: Andrew Strelsky <46897303+astrelsky@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:50:53 -0400 Subject: [PATCH] guard posix headers and use of posix only functions on Windows --- .../01_fmha/fmha_fwd_head_grouping.hpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/projects/composablekernel/example/ck_tile/01_fmha/fmha_fwd_head_grouping.hpp b/projects/composablekernel/example/ck_tile/01_fmha/fmha_fwd_head_grouping.hpp index 9cd1fb9cdcb7..aadeea74cdc2 100644 --- a/projects/composablekernel/example/ck_tile/01_fmha/fmha_fwd_head_grouping.hpp +++ b/projects/composablekernel/example/ck_tile/01_fmha/fmha_fwd_head_grouping.hpp @@ -8,7 +8,9 @@ #include #include #include +#ifndef _WIN32 #include +#endif #include #include #include @@ -102,6 +104,8 @@ inline std::optional get_current_kfd_location() ((props.pciBusID & 0xff) << 8) | ((props.pciDeviceID & 0x1f) << 3)}; } +#ifndef _WIN32 + inline std::optional find_matching_kfd_node(const kfd_device_location& loc) { constexpr const char* kKfdNodesDir = "/sys/class/kfd/kfd/topology/nodes"; @@ -176,6 +180,25 @@ inline size_t get_kfd_sysfs_llc_cache_bytes() return read_kfd_node_l3_bytes(*node); } +#else + +inline std::optional find_matching_kfd_node(const kfd_device_location& loc) +{ + return std::nullopt; +} + +inline size_t read_kfd_node_l3_bytes(const std::string& node_name) +{ + return 0; +} + +inline size_t get_kfd_sysfs_llc_cache_bytes() +{ + return 0; +} + +#endif // _WIN32 + inline size_t get_default_llc_cache_bytes_for_arch(const std::string& arch); inline size_t resolve_llc_cache_bytes_uncached(const std::string& arch)