Disable mmap on s390x
Usually downloaded models are little-endian and byteswapping is needed. Byteswapping is not implemented for mmap model loading.
This commit is contained in:
parent
0682209c66
commit
21f7ca2fb3
1 changed files with 2 additions and 1 deletions
|
@ -441,7 +441,8 @@ void * llama_mmap::addr() const { return pimpl->addr; }
|
||||||
|
|
||||||
void llama_mmap::unmap_fragment(size_t first, size_t last) { pimpl->unmap_fragment(first, last); }
|
void llama_mmap::unmap_fragment(size_t first, size_t last) { pimpl->unmap_fragment(first, last); }
|
||||||
|
|
||||||
#if defined(_POSIX_MEMLOCK_RANGE) || defined(_WIN32)
|
// disable mmap on s390x while it usually loads little-endian models
|
||||||
|
#if (defined(_POSIX_MEMLOCK_RANGE) && !defined(__s390x__)) || defined(_WIN32)
|
||||||
const bool llama_mmap::SUPPORTED = true;
|
const bool llama_mmap::SUPPORTED = true;
|
||||||
#else
|
#else
|
||||||
const bool llama_mmap::SUPPORTED = false;
|
const bool llama_mmap::SUPPORTED = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue