Skip to content

Commit

Permalink
Merge pull request #4871 from martin-frbg/issue4868
Browse files Browse the repository at this point in the history
Ensure a buffer has been allocated for each thread before invoking it
  • Loading branch information
martin-frbg authored Aug 14, 2024
2 parents 6452f7b + 23b5d66 commit b80671d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions driver/others/blas_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,8 @@ 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);

//For target LOONGSON3R5, applying an offset to the buffer is essential
//for minimizing cache conflicts and optimizing performance.
#if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)
Expand Down

0 comments on commit b80671d

Please sign in to comment.