Skip to content

Commit b80671d

Browse files
authored
Merge pull request #4871 from martin-frbg/issue4868
Ensure a buffer has been allocated for each thread before invoking it
2 parents 6452f7b + 23b5d66 commit b80671d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

driver/others/blas_server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,8 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l
10761076
main_status[cpu] = MAIN_RUNNING1;
10771077
#endif
10781078

1079+
if (buffer == NULL) blas_thread_buffer[cpu] = blas_memory_alloc(2);
1080+
10791081
//For target LOONGSON3R5, applying an offset to the buffer is essential
10801082
//for minimizing cache conflicts and optimizing performance.
10811083
#if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)

0 commit comments

Comments
 (0)