diff --git a/frame/base/bli_rntm.c b/frame/base/bli_rntm.c index b26322b47..79782c282 100644 --- a/frame/base/bli_rntm.c +++ b/frame/base/bli_rntm.c @@ -54,9 +54,12 @@ void bli_rntm_init_from_global( rntm_t* rntm ) dim_t jc, pc, ic, jr, ir; - // We must ensure that global_rntm and tl_rntm have been initialized. + // We must ensure that global_rntm has been initialized bli_init_once(); + // We must also ensure that tl_rntm has been updated. + bli_thread_update_tl(); + // Acquire the mutex protecting global_rntm. bli_pthread_mutex_lock( &global_rntm_mutex ); diff --git a/frame/thread/bli_thread.c b/frame/thread/bli_thread.c index dd73d91b4..fe4b5ce25 100644 --- a/frame/thread/bli_thread.c +++ b/frame/thread/bli_thread.c @@ -64,6 +64,8 @@ void bli_thread_init( void ) // to ensure all thread local get information from any BLIS environment // variables set, as these are not re-read for performance reasons. bli_thread_init_rntm_from_env( &global_rntm ); + // Initialize tl_rntm. + bli_thread_update_rntm_from_env( &tl_rntm ); } void bli_thread_update_tl( void )