Ensure a memory buffer has been allocated for each thread before invoking it

This commit is contained in:
Martin Kroeker 2024-08-14 10:35:44 +02:00 committed by GitHub
parent e5525036e7
commit 23b5d66a86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -1076,6 +1076,8 @@ fprintf(STDERR, "Server[%2ld] Calculation started. Mode = 0x%03x M = %3ld N=%3l
main_status[cpu] = MAIN_RUNNING1; main_status[cpu] = MAIN_RUNNING1;
#endif #endif
if (buffer == NULL) blas_thread_buffer[cpu] = blas_memory_alloc(2);
//For target LOONGSON3R5, applying an offset to the buffer is essential //For target LOONGSON3R5, applying an offset to the buffer is essential
//for minimizing cache conflicts and optimizing performance. //for minimizing cache conflicts and optimizing performance.
#if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY) #if defined(ARCH_LOONGARCH64) && !defined(NO_AFFINITY)