From 5ddbd1843db1a775f12f74fb233a2ef193364fe9 Mon Sep 17 00:00:00 2001 From: slaren Date: Thu, 30 May 2024 10:01:37 +0200 Subject: [PATCH] enable openmp by default --- CMakeLists.txt | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0abc78f4c7ac2..7ae457a215ef5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ set(LLAMA_METAL_MACOSX_VERSION_MIN "" CACHE STRING set(LLAMA_METAL_STD "" CACHE STRING "llama: metal standard version (-std flag)") option(LLAMA_KOMPUTE "llama: use Kompute" OFF) option(LLAMA_RPC "llama: use RPC" OFF) -option(LLAMA_OPENMP "llama: use OpenMP" OFF) +option(LLAMA_OPENMP "llama: use OpenMP" ON) option(LLAMA_SYCL "llama: use SYCL" OFF) option(LLAMA_SYCL_F16 "llama: use 16 bit floats for sycl calculations" OFF) set(LLAMA_SYCL_TARGET "INTEL" CACHE STRING "llama: sycl target device") diff --git a/Makefile b/Makefile index 9d7d7f965c266..6ca9ea4b6b52e 100644 --- a/Makefile +++ b/Makefile @@ -400,11 +400,11 @@ ifndef LLAMA_NO_ACCELERATE endif endif # LLAMA_NO_ACCELERATE -ifdef LLAMA_OPENMP +ifndef LLAMA_NO_OPENMP MK_CPPFLAGS += -DGGML_USE_OPENMP MK_CFLAGS += -fopenmp MK_CXXFLAGS += -fopenmp -endif # LLAMA_OPENMP +endif # LLAMA_NO_OPENMP ifdef LLAMA_OPENBLAS MK_CPPFLAGS += -DGGML_USE_OPENBLAS $(shell pkg-config --cflags-only-I openblas)