From 1a8350f70557fc53ca0c2eadf2076710dd0d9bc9 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Mon, 5 Mar 2018 13:32:00 -0600 Subject: [PATCH] Fixed cache blocksize bug in knl configuration. Details: - Changed the mc blocksize for double real execution in the knl sub- configuration from 160 to 148. The old value was not a multiple of mr (which is 24), and thus the safeguards in bli_gks_register_cntx() were tripping. Thanks for Dave Love for reporting this issue. - Switch knl sub-configuration to use default blocksizes for datatypes not supported by native kernels. - Fixed typos in bli_error.c that prevented certain error strings (which report maximum cache blocksizes not being multiples of their corresponding register blocksize) from properly initializing. --- config/knl/bli_cntx_init_knl.c | 14 +++++++------- frame/base/bli_error.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/config/knl/bli_cntx_init_knl.c b/config/knl/bli_cntx_init_knl.c index a8c5b8cb0..794e67502 100644 --- a/config/knl/bli_cntx_init_knl.c +++ b/config/knl/bli_cntx_init_knl.c @@ -63,13 +63,13 @@ void bli_cntx_init_knl( cntx_t* cntx ) // Initialize level-3 blocksize objects with architecture-specific values. // s d c z - bli_blksz_init_easy( &blkszs[ BLIS_MR ], 0, 24, 0, 0 ); - bli_blksz_init_easy( &blkszs[ BLIS_NR ], 0, 8, 0, 0 ); - bli_blksz_init ( &blkszs[ BLIS_MC ], 0, 120, 0, 0, - 0, 160, 0, 0 ); - bli_blksz_init ( &blkszs[ BLIS_KC ], 0, 336, 0, 0, - 0, 420, 0, 0 ); - bli_blksz_init_easy( &blkszs[ BLIS_NC ], 0, 14400, 0, 0 ); + bli_blksz_init_easy( &blkszs[ BLIS_MR ], -1, 24, -1, -1 ); + bli_blksz_init_easy( &blkszs[ BLIS_NR ], -1, 8, -1, -1 ); + bli_blksz_init ( &blkszs[ BLIS_MC ], -1, 120, -1, -1, + -1, 148, -1, -1 ); + bli_blksz_init ( &blkszs[ BLIS_KC ], -1, 336, -1, -1, + -1, 420, -1, -1 ); + bli_blksz_init_easy( &blkszs[ BLIS_NC ], -1, 14400, -1, -1 ); // Update the context with the current architecture's register and cache // blocksizes (and multiples) for native execution. diff --git a/frame/base/bli_error.c b/frame/base/bli_error.c index afe86f5ff..d78c48387 100644 --- a/frame/base/bli_error.c +++ b/frame/base/bli_error.c @@ -166,15 +166,15 @@ void bli_error_init_msgs( void ) sprintf( bli_error_string_for_code(BLIS_MC_DEF_NONMULTIPLE_OF_MR), "Default MC is non-multiple of MR for one or more datatypes." ); - sprintf( bli_error_string_for_code(BLIS_MC_DEF_NONMULTIPLE_OF_MR), + sprintf( bli_error_string_for_code(BLIS_MC_MAX_NONMULTIPLE_OF_MR), "Maximum MC is non-multiple of MR for one or more datatypes." ); sprintf( bli_error_string_for_code(BLIS_NC_DEF_NONMULTIPLE_OF_NR), "Default NC is non-multiple of NR for one or more datatypes." ); - sprintf( bli_error_string_for_code(BLIS_NC_DEF_NONMULTIPLE_OF_NR), + sprintf( bli_error_string_for_code(BLIS_NC_MAX_NONMULTIPLE_OF_NR), "Maximum NC is non-multiple of NR for one or more datatypes." ); sprintf( bli_error_string_for_code(BLIS_KC_DEF_NONMULTIPLE_OF_KR), "Default KC is non-multiple of KR for one or more datatypes." ); - sprintf( bli_error_string_for_code(BLIS_KC_DEF_NONMULTIPLE_OF_KR), + sprintf( bli_error_string_for_code(BLIS_KC_MAX_NONMULTIPLE_OF_KR), "Maximum KC is non-multiple of KR for one or more datatypes." ); }