Disable mmap on s390x in llama-quant too

This commit is contained in:
Aleksei Nikiforov 2025-01-21 12:15:34 +01:00
parent 3c22daa66e
commit f4217a81fc

View file

@ -514,7 +514,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
// mmap consistently increases speed Linux, and also increases speed on Windows with // mmap consistently increases speed Linux, and also increases speed on Windows with
// hot cache. It may cause a slowdown on macOS, possibly related to free memory. // hot cache. It may cause a slowdown on macOS, possibly related to free memory.
#if defined(__linux__) || defined(_WIN32) #if (defined(__linux__) && !defined(__s390x__)) || defined(_WIN32)
constexpr bool use_mmap = true; constexpr bool use_mmap = true;
#else #else
constexpr bool use_mmap = false; constexpr bool use_mmap = false;