Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on linux, link against Openblas Parallel (e.g. for fedora 40) #1077

Open
wants to merge 2 commits into
base: concedo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ else
endif

ifdef LLAMA_OPENBLAS
OPENBLAS_BUILD = $(CXX) $(CXXFLAGS) $^ $(ARCH_ADD) -lopenblas -shared -o [email protected] $(LDFLAGS)
OPENBLAS_BUILD = $(CXX) $(CXXFLAGS) $^ $(ARCH_ADD) -lopenblasp -shared -o [email protected] $(LDFLAGS)
endif
ifdef LLAMA_CLBLAST
ifeq ($(UNAME_S),Darwin)
Expand Down
11 changes: 10 additions & 1 deletion ggml/src/ggml-blas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ ggml_backend_t ggml_backend_blas_init(void) {
fprintf(stderr, "%s: warning: ggml is using OpenMP, but BLIS was compiled without OpenMP support\n", __func__);
#endif

fprintf(stderr, "%s: openblas_get_parallel %d \n", __func__, openblas_get_parallel());
fprintf(stderr, "%s: openblas_get_config %s \n", __func__, openblas_get_config());

#ifdef GGML_USE_OPENMP
fprintf(stderr, "%s: GGML_USE_OPENMP %s \n", __func__, GGML_USE_OPENMP);
#else
fprintf(stderr, "%s: GGML_USE_OPENMP n/a \n", __func__);
#endif

return backend;
}

Expand All @@ -364,4 +373,4 @@ void ggml_backend_blas_set_n_threads(ggml_backend_t backend_blas, int n_threads)

ggml_backend_blas_context * ctx = (ggml_backend_blas_context *)backend_blas->context;
ctx->n_threads = n_threads;
}
}