Inquiry and Suggestions Regarding OpenBLAS Code Flow with OpenMP
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 20/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- c
- Bereich
- hpc, performance
Rechercherichtung
Beginne damit, gemm_driver in driver/level3/level3_thread.c sowie exec_blas und inner_thread in driver/others/blas_server_omp.c nachzuverfolgen. Reproduziere den gemeldeten Deadlock mit weniger OpenMP-Threads als Warteschlangenpartitionen und vergleiche anschließend die Pfade für Sperren und Busy-Waiting. Als abgeschlossen gilt die Aufgabe, wenn eine bestätigte Erklärung und eine klar abgegrenzte Änderung an der Synchronisierung oder eine Dokumentationslösung vorliegen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hello,
I've been delving into the OpenBLAS codebase, specifically focusing on the gemm_driver function in level3_thread.c with the #USE_OPENMP=1 flag enabled. I've come across a section in the code where a lock is used in the Pthreads and Win32 backend before initializing and assigning the blasqueue. The lock is released only after the exec_blas call is completed.
My current understanding is :
- In the case of Pthreads The thread pool is initialized (POSIX), and when a BLAS call is made, the thread pool is utilized to execute it, after which the threads go back to sleep. The use of locks ensures that only one exec_blas call can be executed at a time.
- If I use a thread pool with
No_of_threads < nthreads(number of queue partitions) defined in level3_thread.c, I encounter a deadlock within the inner_threads function. - There seems to be significant busy-waiting (NOP) inside the inner_thread function call for thread synchronization.
I have a few questions and want to seek suggestions from the community:
-
I noticed that OpenMP locking mechanisms like omp_set_lock are not used, and instead, busy-waiting is implemented inside the exec_blas function in blas_server_omp.c using max_parallel_number. Could you please provide insights into this choice?
-
The inner_thread function appears to encounter deadlock when used with fewer threads. I tested this in OpenMP by creating a parallel region inside exec_blas in line 437 - blas_server_omp.c with a fixed number of threads less than nthreads. Could you shed some light on the reasons behind this behavior?
-
Considering the busy-waiting in the code, have there been considerations for putting threads to sleep or employing other synchronization methods to enhance efficiency?
I would appreciate clarification on these points.
- Vorherrschende Sprache
- C
- Sterne
- 7.6k
- Forks
- 1.7k
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 42
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus OpenMathLib/OpenBLAS
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
OpenMathLib/OpenBLAS#6029 · 21 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
OpenMathLib/OpenBLAS#6028 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
OpenMathLib/OpenBLAS#6005 · 21 Kommentare · 2 Reaktionen ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
OpenMathLib/OpenBLAS#5930 · 2 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
OpenMathLib/OpenBLAS#5870 · 4 Kommentare ·
Alle Issues in OpenMathLib/OpenBLAS
Ähnliche Issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
HarbourMasters/Shipwright#7229 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 Kommentar ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100