!31485 [MS][LITE][parallel predict] fix numa for linux arm64

Merge pull request !31485 from yefeng/265-fix_numa_for_linux_arm64-r1.6
This commit is contained in:
i-robot 2022-03-18 12:46:43 +00:00 committed by Gitee
commit ba6e1c7b6b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 1 deletions

View File

@ -26,6 +26,13 @@ static constexpr int kBitsPerByte = 8;
static constexpr auto kBitsPerMask = static_cast<int>(sizeof(uint64_t) * kBitsPerByte);
} // namespace
bool NUMAAdapter::Available() const {
#ifdef MACHINE_LINUX_ARM64
return false;
#endif
return available_;
}
NUMAAdapter::NUMAAdapter() {
available_ = false;
handle_ = dlopen("libnuma.so.1.0.0", RTLD_LAZY | RTLD_LOCAL);

View File

@ -57,7 +57,7 @@ class NUMAAdapter {
NUMAAdapter();
~NUMAAdapter();
inline bool Available() const { return available_; }
bool Available() const;
void Bind(int node_id);
void *Malloc(int node_id, size_t size);
void Free(void *data, size_t size);