-
Notifications
You must be signed in to change notification settings - Fork 551
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenBLAS] Backport new threading buffer patch (#9263)
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
O/OpenBLAS/[email protected]/bundled/patches/81-memory-buffer-multi-threading.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From d24b3cf39392a99e81ed47a5f093fbd074d4b39b Mon Sep 17 00:00:00 2001 | ||
From: Martin Kroeker <[email protected]> | ||
Date: Thu, 15 Aug 2024 15:32:58 +0200 | ||
Subject: [PATCH] properly fix buffer allocation and assignment | ||
|
||
--- | ||
driver/others/blas_server.c | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c | ||
index b9a7674c17..29f8a5e646 100644 | ||
--- a/driver/others/blas_server.c | ||
+++ b/driver/others/blas_server.c | ||
@@ -1076,7 +1076,11 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l | ||
main_status[cpu] = MAIN_RUNNING1; | ||
#endif | ||
|
||
-if (buffer == NULL) blas_thread_buffer[cpu] = blas_memory_alloc(2); | ||
+if (buffer == NULL) { | ||
+ blas_thread_buffer[cpu] = blas_memory_alloc(2); | ||
+ buffer = blas_thread_buffer[cpu]; | ||
+} | ||
+ | ||
|
||
//For target LOONGSON3R5, applying an offset to the buffer is essential | ||
//for minimizing cache conflicts and optimizing performance. |
26 changes: 26 additions & 0 deletions
26
O/OpenBLAS/[email protected]/bundled/patches/81-memory-buffer-multi-threading.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From d24b3cf39392a99e81ed47a5f093fbd074d4b39b Mon Sep 17 00:00:00 2001 | ||
From: Martin Kroeker <[email protected]> | ||
Date: Thu, 15 Aug 2024 15:32:58 +0200 | ||
Subject: [PATCH] properly fix buffer allocation and assignment | ||
|
||
--- | ||
driver/others/blas_server.c | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/driver/others/blas_server.c b/driver/others/blas_server.c | ||
index b9a7674c17..29f8a5e646 100644 | ||
--- a/driver/others/blas_server.c | ||
+++ b/driver/others/blas_server.c | ||
@@ -1076,7 +1076,11 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l | ||
main_status[cpu] = MAIN_RUNNING1; | ||
#endif | ||
|
||
-if (buffer == NULL) blas_thread_buffer[cpu] = blas_memory_alloc(2); | ||
+if (buffer == NULL) { | ||
+ blas_thread_buffer[cpu] = blas_memory_alloc(2); | ||
+ buffer = blas_thread_buffer[cpu]; | ||
+} | ||
+ | ||
|
||
//For target LOONGSON3R5, applying an offset to the buffer is essential | ||
//for minimizing cache conflicts and optimizing performance. |