diff --git a/frame/3/bli_l3_oapi_ex.c b/frame/3/bli_l3_oapi_ex.c index e4c815fe3..20b0294eb 100644 --- a/frame/3/bli_l3_oapi_ex.c +++ b/frame/3/bli_l3_oapi_ex.c @@ -102,7 +102,7 @@ void PASTEMAC(gemm,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -153,7 +153,7 @@ void PASTEMAC(gemmt,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -281,7 +281,7 @@ void PASTEMAC(hemm,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -331,7 +331,7 @@ void PASTEMAC(symm,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -381,7 +381,7 @@ void PASTEMAC(trmm3,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -487,7 +487,7 @@ void PASTEMAC(trmm,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) @@ -534,7 +534,7 @@ void PASTEMAC(trsm,BLIS_OAPI_EX_SUF) // If necessary, obtain a valid context from the gks using the induced // method id determined above. - if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im, dt ); + if ( cntx == NULL ) cntx = bli_gks_query_ind_cntx( im ); // Check the operands. if ( bli_error_checking_is_enabled() ) diff --git a/frame/3/gemm/bli_gemm_md.c b/frame/3/gemm/bli_gemm_md.c index a283c1235..1e23d058e 100644 --- a/frame/3/gemm/bli_gemm_md.c +++ b/frame/3/gemm/bli_gemm_md.c @@ -439,8 +439,7 @@ mddm_t bli_gemm_md_rcc // the target datatype. (The packm_blk_var1_md() function has "built-in" // support for packing to 1r (and 1e) schemas, whereas the // packm_blk_var1() function relies on packm kernels for packing to 1r. - const num_t dt_complex = bli_obj_dt( a ); - const cntx_t* cntx_1m = bli_gks_query_ind_cntx( BLIS_1M, dt_complex ); + const cntx_t* cntx_1m = bli_gks_query_ind_cntx( BLIS_1M ); const func_t* packm_1m_mr = bli_cntx_get_ukrs( BLIS_PACKM_MRXK_KER, cntx_1m ); const func_t* packm_1m_nr = bli_cntx_get_ukrs( BLIS_PACKM_NRXK_KER, cntx_1m ); diff --git a/frame/base/bli_gks.c b/frame/base/bli_gks.c index 4a7ccbbc3..ff80f85ed 100644 --- a/frame/base/bli_gks.c +++ b/frame/base/bli_gks.c @@ -509,8 +509,7 @@ static bli_pthread_mutex_t gks_mutex = BLIS_PTHREAD_MUTEX_INITIALIZER; const cntx_t* bli_gks_query_ind_cntx ( - ind_t ind, - num_t dt + ind_t ind ) { bli_init_once(); @@ -675,7 +674,7 @@ const char* bli_gks_l3_ukr_impl_string( ukr_t ukr, ind_t method, num_t dt ) // Query the context for the current induced method and datatype, and // then query the ukernel function pointer for the given datatype from // that context. - const cntx_t* cntx = bli_gks_query_ind_cntx( method, dt ); + const cntx_t* cntx = bli_gks_query_ind_cntx( method ); void_fp fp = bli_cntx_get_ukr_dt( dt, ukr, cntx ); // Check whether the ukernel function pointer is NULL for the given diff --git a/frame/base/bli_gks.h b/frame/base/bli_gks.h index 30e3b2e39..3a93fd59e 100644 --- a/frame/base/bli_gks.h +++ b/frame/base/bli_gks.h @@ -50,7 +50,7 @@ BLIS_EXPORT_BLIS const cntx_t* bli_gks_query_nat_cntx( void ); const cntx_t* bli_gks_query_cntx_noinit( void ); -BLIS_EXPORT_BLIS const cntx_t* bli_gks_query_ind_cntx( ind_t ind, num_t dt ); +BLIS_EXPORT_BLIS const cntx_t* bli_gks_query_ind_cntx( ind_t ind ); BLIS_EXPORT_BLIS void bli_gks_init_ref_cntx( cntx_t* cntx ); diff --git a/frame/compat/extra/bla_gemm3m.c b/frame/compat/extra/bla_gemm3m.c index 31f677db6..258ac5bbb 100644 --- a/frame/compat/extra/bla_gemm3m.c +++ b/frame/compat/extra/bla_gemm3m.c @@ -103,7 +103,7 @@ void PASTEF77(ch,blasname) \ abbreviated version of bli_gemm_ex() so that we can bypass consideration of sup, which doesn't make sense in this context. */ \ { \ - cntx_t* cntx = ( cntx_t* )bli_gks_query_ind_cntx( BLIS_1M, dt ); \ + cntx_t* cntx = ( cntx_t* )bli_gks_query_ind_cntx( BLIS_1M ); \ \ rntm_t rntm_l; \ rntm_t* rntm = &rntm_l; \ @@ -222,7 +222,7 @@ void PASTEF77(ch,blasname) \ abbreviated version of bli_gemm_ex() so that we can bypass consideration of sup, which doesn't make sense in this context. */ \ { \ - cntx_t* cntx = ( cntx_t* )bli_gks_query_ind_cntx( BLIS_1M, dt ); \ + cntx_t* cntx = ( cntx_t* )bli_gks_query_ind_cntx( BLIS_1M ); \ \ rntm_t rntm_l; \ rntm_t* rntm = &rntm_l; \ diff --git a/test/1m4m/test_gemm.c b/test/1m4m/test_gemm.c index f9a855125..87bdceb11 100644 --- a/test/1m4m/test_gemm.c +++ b/test/1m4m/test_gemm.c @@ -109,7 +109,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/3/test_gemm.c b/test/3/test_gemm.c index 745dae07c..96992f4a1 100644 --- a/test/3/test_gemm.c +++ b/test/3/test_gemm.c @@ -109,7 +109,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/3/test_hemm.c b/test/3/test_hemm.c index 8df46f0f0..537378d43 100644 --- a/test/3/test_hemm.c +++ b/test/3/test_hemm.c @@ -87,7 +87,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/3/test_herk.c b/test/3/test_herk.c index 65dcb9f6c..6dbaf1936 100644 --- a/test/3/test_herk.c +++ b/test/3/test_herk.c @@ -89,7 +89,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/3/test_trmm.c b/test/3/test_trmm.c index 425630a2a..4e58b95fa 100644 --- a/test/3/test_trmm.c +++ b/test/3/test_trmm.c @@ -92,7 +92,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/3/test_trsm.c b/test/3/test_trsm.c index 678be4330..4897d4627 100644 --- a/test/3/test_trsm.c +++ b/test/3/test_trsm.c @@ -92,7 +92,7 @@ int main( int argc, char** argv ) ind_t ind_mod = ind; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/skx/test_gemm.c b/test/studies/skx/test_gemm.c index 64311753c..53a227c2b 100644 --- a/test/studies/skx/test_gemm.c +++ b/test/studies/skx/test_gemm.c @@ -94,7 +94,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/skx/test_hemm.c b/test/studies/skx/test_hemm.c index 4ed9b2b67..1b0b1a609 100644 --- a/test/studies/skx/test_hemm.c +++ b/test/studies/skx/test_hemm.c @@ -93,7 +93,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/skx/test_syrk.c b/test/studies/skx/test_syrk.c index 5e1c43159..37b8c54da 100644 --- a/test/studies/skx/test_syrk.c +++ b/test/studies/skx/test_syrk.c @@ -92,7 +92,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/skx/test_trmm.c b/test/studies/skx/test_trmm.c index 1c7db7956..235e1e224 100644 --- a/test/studies/skx/test_trmm.c +++ b/test/studies/skx/test_trmm.c @@ -94,7 +94,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/thunderx2/test_gemm.c b/test/studies/thunderx2/test_gemm.c index f212c570b..7f1880558 100644 --- a/test/studies/thunderx2/test_gemm.c +++ b/test/studies/thunderx2/test_gemm.c @@ -93,7 +93,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/thunderx2/test_hemm.c b/test/studies/thunderx2/test_hemm.c index 5bf0373b4..11e0bea68 100644 --- a/test/studies/thunderx2/test_hemm.c +++ b/test/studies/thunderx2/test_hemm.c @@ -93,7 +93,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/thunderx2/test_syrk.c b/test/studies/thunderx2/test_syrk.c index 4b240e25a..5b9a9957b 100644 --- a/test/studies/thunderx2/test_syrk.c +++ b/test/studies/thunderx2/test_syrk.c @@ -92,7 +92,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/test/studies/thunderx2/test_trmm.c b/test/studies/thunderx2/test_trmm.c index 0fb153444..4851ac222 100644 --- a/test/studies/thunderx2/test_trmm.c +++ b/test/studies/thunderx2/test_trmm.c @@ -94,7 +94,7 @@ int main( int argc, char** argv ) if ( ind == BLIS_3M1 ) ind_mod = BLIS_1M; // Initialize a context for the current induced method and datatype. - cntx = bli_gks_query_ind_cntx( ind_mod, dt ); + cntx = bli_gks_query_ind_cntx( ind_mod ); // Set k to the kc blocksize for the current datatype. k_input = bli_cntx_get_blksz_def_dt( dt, BLIS_KC, cntx ); diff --git a/testsuite/src/test_libblis.c b/testsuite/src/test_libblis.c index f267ae158..da729b3a9 100644 --- a/testsuite/src/test_libblis.c +++ b/testsuite/src/test_libblis.c @@ -1080,9 +1080,11 @@ void libblis_test_output_params_struct( FILE* os, test_params_t* params ) bli_ind_oper_get_avail_impl_string( BLIS_GEMM, BLIS_DCOMPLEX ) ); libblis_test_fprintf_c( os, "\n" ); - // Query a native context. - cntx_c = ( cntx_t* )bli_gks_query_ind_cntx( im, BLIS_SCOMPLEX ); - cntx_z = ( cntx_t* )bli_gks_query_ind_cntx( im, BLIS_DCOMPLEX ); + // Query a native context. NOTE: Now that we've removed the dt argument from + // bli_gks_query_ind_cntx(), we can consolidate cntx_c and cntx_z; there is + // no need to query two contexts since they are the same. + cntx_c = ( cntx_t* )bli_gks_query_ind_cntx( im ); + cntx_z = ( cntx_t* )bli_gks_query_ind_cntx( im ); libblis_test_fprintf_c( os, "level-3 blocksizes c z \n" ); libblis_test_fprintf_c( os, " mc %7d %7d\n",