!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:
commit
ba6e1c7b6b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue