Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <dirent.h>
#include <fstream>
#include <iostream>
#include <limits>
#include <optional>
#include <string>

#ifdef __linux__
#include <dirent.h>
#endif

#ifndef CK_TILE_FMHA_ENABLE_HEAD_GROUPING
#define CK_TILE_FMHA_ENABLE_HEAD_GROUPING 1
#endif
Expand Down Expand Up @@ -70,6 +73,8 @@ inline std::optional<long long> read_property_value(const std::string& filepath,
return std::nullopt;
}

#if defined(__linux__)

struct kfd_device_location
{
int domain = 0;
Expand Down Expand Up @@ -176,6 +181,12 @@ inline size_t get_kfd_sysfs_llc_cache_bytes()
return read_kfd_node_l3_bytes(*node);
}

#else

inline size_t get_kfd_sysfs_llc_cache_bytes() { return 0; }

#endif

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)
Expand Down
Loading