projects
/
platform
/
upstream
/
openblas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08e3754
)
Use OMP_ADAPTIVE setting to choose between static and dynamic OMP threadpool size
author
Martin Kroeker
<martin@ruby.chemie.uni-freiburg.de>
Wed, 27 Jul 2022 21:43:20 +0000
(23:43 +0200)
committer
GitHub
<noreply@github.com>
Wed, 27 Jul 2022 21:43:20 +0000
(23:43 +0200)
driver/others/blas_server_omp.c
patch
|
blob
|
history
diff --git
a/driver/others/blas_server_omp.c
b/driver/others/blas_server_omp.c
index
a576127
..
1a5fd06
100644
(file)
--- a/
driver/others/blas_server_omp.c
+++ b/
driver/others/blas_server_omp.c
@@
-403,6
+403,7
@@
int exec_blas(BLASLONG num, blas_queue_t *queue){
break;
}
+if (openblas_omp_adaptive_env() != 0) {
#pragma omp parallel for num_threads(num) schedule(OMP_SCHED)
for (i = 0; i < num; i ++) {
@@
-412,6
+413,17
@@
int exec_blas(BLASLONG num, blas_queue_t *queue){
exec_threads(&queue[i], buf_index);
}
+} else {
+#pragma omp parallel for schedule(OMP_SCHED)
+ for (i = 0; i < num; i ++) {
+
+#ifndef USE_SIMPLE_THREADED_LEVEL3
+ queue[i].position = i;
+#endif
+
+ exec_threads(&queue[i], buf_index);
+ }
+}
#ifdef HAVE_C11
atomic_store(&blas_buffer_inuse[buf_index], false);