Merge master code till 06_mar_2018 to amd-staging

Change-Id: I12267e5999c92417e3715fef4f36ac2131d00f1a
This commit is contained in:
praveeng
2018-03-09 19:13:08 +05:30
63 changed files with 262 additions and 146 deletions

104
common.mk
View File

@@ -78,17 +78,17 @@ define load-var-for
$($(strip $(1)).$(strip $(2)))
endef
# Define some functions that return the appropriate CFLAGS for a given
# configuration. This assumes that the make_defs.mk files have already been
# included, which results in those values having been stored to
# configuration-qualified variables.
#
# --- CFLAGS query functions ---------------------------------------------------
#
# Define some functions that return the appropriate CFLAGS for a given
# configuration. This assumes that the make_defs.mk files have already been
# included, which results in those values having been stored to
# configuration-qualified variables.
get-noopt-cflags-for = $(strip $(call load-var-for,CDBGFLAGS,$(1)) \
$(call load-var-for,CWARNFLAGS,$(1)) \
$(call load-var-for,CPICFLAGS,$(1)) \
@@ -266,11 +266,17 @@ endif
# makefile definitions.
MAKE_DEFS_FILE := make_defs.mk
# Construct the paths to the makefile definitions files, each of which resides
# in a separate configuration sub-directory. We include CONFIG_NAME in this
# list since we might need
ALL_CONFIGS := $(sort $(strip $(CONFIG_LIST) $(CONFIG_NAME)))
CONFIG_PATHS := $(addprefix $(CONFIG_PATH)/, $(ALL_CONFIGS))
# Assembly a list of all configuration family members, including the
# configuration family name itself. Note that sort() will remove duplicates
# for situations where CONFIG_NAME is present in CONFIG_LIST, such as would
# be the case for singleton families.
CONFIG_LIST_FAM := $(sort $(strip $(CONFIG_LIST) $(CONFIG_NAME)))
# Construct the paths to the makefile definitions files, each of which
# resides in a separate configuration sub-directory. We use CONFIG_LIST_FAM
# since we might need the makefile definitions associated with the
# configuration family (if it is an umbrella family).
CONFIG_PATHS := $(addprefix $(CONFIG_PATH)/, $(CONFIG_LIST_FAM))
MAKE_DEFS_MK_PATHS := $(addsuffix /$(MAKE_DEFS_FILE), $(CONFIG_PATHS))
# Initialize the list of included (found) configurations to empty.
@@ -283,14 +289,11 @@ CONFIGS_INCL :=
# we didn't, then maybe a configuration is mislabeled or missing. The
# check-env-make-defs target checks ALL_MAKE_DEFS_MK_PRESENT and outputs
# an error message if it is set to 'no'.
# NOTE: We combine the CONFIG_NAME and CONFIG_LIST for situations where
# the CONFIG_NAME is absent from the CONFIG_LIST (e.g., 'intel64' is a
# configuration family name with its own configuration directory and its
# own make_defs.mk file, but not a sub-configuration itself). If
# CONFIG_NAME is present in CONFIG_LIST, as with singleton configuration
# families, then the sort() function will remove duplicates from both
# strings being compared.
CONFIGS_EXPECTED := $(CONFIG_LIST) $(CONFIG_NAME)
# NOTE: We use CONFIG_LIST_FAM as the expected list of configurations.
# This combines CONFIG_NAME with CONFIG_LIST. The inclusion of CONFIG_NAME
# is needed for situations where the configuration family is an umbrella
# family (e.g. 'intel64'), since families have separate make_def.mk files.
CONFIGS_EXPECTED := $(CONFIG_LIST_FAM)
ifeq ($(sort $(strip $(CONFIGS_INCL))), \
$(sort $(strip $(CONFIGS_EXPECTED))))
ALL_MAKE_DEFS_MK_PRESENT := yes
@@ -323,38 +326,43 @@ SOFLAGS := -shared
# --- Configuration-agnostic flags ---------------------------------------------
#
# --- C Preprocessor flags ---
# Enable clock_gettime() in time.h.
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
$(foreach conf, $(CONFIG_LIST), $(eval $(call append-var-for,CPPROCFLAGS,$(conf))))
# --- Shared library (position-independent code) flags ---
# Emit position-independent code for dynamic linking.
CPICFLAGS := -fPIC
$(foreach conf, $(CONFIG_LIST), $(eval $(call append-var-for,CPICFLAGS,$(conf))))
# --- Miscellaneous flags ---
# Enable C99.
CMISCFLAGS := -std=c99
$(foreach conf, $(CONFIG_LIST), $(eval $(call append-var-for,CMISCFLAGS,$(conf))))
# Disable tautological comparision warnings in clang.
ifeq ($(CC_VENDOR),clang)
CMISCFLAGS := -Wno-tautological-compare
$(foreach conf, $(CONFIG_LIST), $(eval $(call append-var-for,CMISCFLAGS,$(conf))))
endif
# --- Warning flags ---
# Disable unused function warnings and stop compiling on first error for
# all compilers that accept such options: gcc, clang, and icc.
ifneq ($(CC_VENDOR),ibm)
CWARNFLAGS := -Wall -Wno-unused-function -Wfatal-errors
$(foreach conf, $(CONFIG_LIST), $(eval $(call append-var-for,CWARNFLAGS,$(conf))))
else
CWARNFLAGS :=
endif
$(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CWARNFLAGS,$(c))))
# --- Shared library (position-independent code) flags ---
# Emit position-independent code for dynamic linking.
CPICFLAGS := -fPIC
$(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CPICFLAGS,$(c))))
# --- Miscellaneous flags ---
# Enable C99.
CMISCFLAGS := -std=c99
$(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CMISCFLAGS,$(c))))
# --- C Preprocessor flags ---
# Enable clock_gettime() in time.h.
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
$(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CPPROCFLAGS,$(c))))
# Disable tautological comparision warnings in clang.
ifeq ($(CC_VENDOR),clang)
CMISCFLAGS := -Wno-tautological-compare
else
CMISCFLAGS :=
endif
$(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CMISCFLAGS,$(c))))
# --- Threading flags ---
@@ -450,13 +458,9 @@ MK_KERNELS_SRC :=
# Construct paths to each of the sub-configurations specified in the
# configuration list. If CONFIG_NAME is not in CONFIG_LIST, include it in
# CONFIG_PATHS since we'll need access to its header files.
ifeq ($(findstring $(CONFIG_NAME),$(CONFIG_LIST)),)
CONFIG_PATHS := $(addprefix $(CONFIG_PATH)/, $(CONFIG_NAME) $(CONFIG_LIST))
else
CONFIG_PATHS := $(addprefix $(CONFIG_PATH)/, $(CONFIG_LIST))
endif
# configuration list. Note that we use CONFIG_LIST_FAM, which already
# has CONFIG_NAME included (with duplicates removed).
CONFIG_PATHS := $(addprefix $(CONFIG_PATH)/, $(CONFIG_LIST_FAM))
# This variable is used by the include statements as they recursively include
# one another. For the 'config' directory, we initialize it to that directory

View File

@@ -46,12 +46,63 @@ void bli_cntx_init_haswell( cntx_t* cntx )
// Update the context with optimized native gemm micro-kernels and
// their storage preferences.
bli_cntx_set_l3_nat_ukrs
(
8,
// gemm
BLIS_GEMM_UKR, BLIS_FLOAT, bli_sgemm_zen_asm_6x16, TRUE,
BLIS_GEMM_UKR, BLIS_DOUBLE, bli_dgemm_zen_asm_6x8, TRUE,
BLIS_GEMM_UKR, BLIS_SCOMPLEX, bli_cgemm_zen_asm_3x8, TRUE,
BLIS_GEMM_UKR, BLIS_DCOMPLEX, bli_zgemm_zen_asm_3x4, TRUE,
// gemmtrsm_l
BLIS_GEMMTRSM_L_UKR, BLIS_FLOAT, bli_sgemmtrsm_l_zen_asm_6x16, TRUE,
BLIS_GEMMTRSM_L_UKR, BLIS_DOUBLE, bli_dgemmtrsm_l_zen_asm_6x8, TRUE,
// gemmtrsm_u
BLIS_GEMMTRSM_U_UKR, BLIS_FLOAT, bli_sgemmtrsm_u_zen_asm_6x16, TRUE,
BLIS_GEMMTRSM_U_UKR, BLIS_DOUBLE, bli_dgemmtrsm_u_zen_asm_6x8, TRUE,
cntx
);
bli_cntx_set_l1f_kers
(
4,
BLIS_GEMM_UKR, BLIS_FLOAT, bli_sgemm_haswell_asm_6x16, TRUE,
BLIS_GEMM_UKR, BLIS_DOUBLE, bli_dgemm_haswell_asm_6x8, TRUE,
BLIS_GEMM_UKR, BLIS_SCOMPLEX, bli_cgemm_haswell_asm_3x8, TRUE,
BLIS_GEMM_UKR, BLIS_DCOMPLEX, bli_zgemm_haswell_asm_3x4, TRUE,
// axpyf
BLIS_AXPYF_KER, BLIS_FLOAT, bli_saxpyf_zen_int_8,
BLIS_AXPYF_KER, BLIS_DOUBLE, bli_daxpyf_zen_int_8,
// dotxf
BLIS_DOTXF_KER, BLIS_FLOAT, bli_sdotxf_zen_int_8,
BLIS_DOTXF_KER, BLIS_DOUBLE, bli_ddotxf_zen_int_8,
cntx
);
// Update the context with optimized level-1v kernels.
bli_cntx_set_l1v_kers
(
10,
// amaxv
BLIS_AMAXV_KER, BLIS_FLOAT, bli_samaxv_zen_int,
BLIS_AMAXV_KER, BLIS_DOUBLE, bli_damaxv_zen_int,
// axpyv
#if 0
BLIS_AXPYV_KER, BLIS_FLOAT, bli_saxpyv_zen_int,
BLIS_AXPYV_KER, BLIS_DOUBLE, bli_daxpyv_zen_int,
#else
BLIS_AXPYV_KER, BLIS_FLOAT, bli_saxpyv_zen_int10,
BLIS_AXPYV_KER, BLIS_DOUBLE, bli_daxpyv_zen_int10,
#endif
// dotv
BLIS_DOTV_KER, BLIS_FLOAT, bli_sdotv_zen_int,
BLIS_DOTV_KER, BLIS_DOUBLE, bli_ddotv_zen_int,
// dotxv
BLIS_DOTXV_KER, BLIS_FLOAT, bli_sdotxv_zen_int,
BLIS_DOTXV_KER, BLIS_DOUBLE, bli_ddotxv_zen_int,
// scalv
#if 0
BLIS_SCALV_KER, BLIS_FLOAT, bli_sscalv_zen_int,
BLIS_SCALV_KER, BLIS_DOUBLE, bli_dscalv_zen_int,
#else
BLIS_SCALV_KER, BLIS_FLOAT, bli_sscalv_zen_int10,
BLIS_SCALV_KER, BLIS_DOUBLE, bli_dscalv_zen_int10,
#endif
cntx
);
@@ -62,17 +113,23 @@ void bli_cntx_init_haswell( cntx_t* cntx )
bli_blksz_init_easy( &blkszs[ BLIS_MC ], 144, 72, 144, 72 );
bli_blksz_init_easy( &blkszs[ BLIS_KC ], 256, 256, 256, 256 );
bli_blksz_init_easy( &blkszs[ BLIS_NC ], 4080, 4080, 4080, 4080 );
bli_blksz_init_easy( &blkszs[ BLIS_AF ], 8, 8, 8, 8 );
bli_blksz_init_easy( &blkszs[ BLIS_DF ], 8, 8, 8, 8 );
// Update the context with the current architecture's register and cache
// blocksizes (and multiples) for native execution.
bli_cntx_set_blkszs
(
BLIS_NAT, 5,
BLIS_NAT, 7,
// level-3
BLIS_NC, &blkszs[ BLIS_NC ], BLIS_NR,
BLIS_KC, &blkszs[ BLIS_KC ], BLIS_KR,
BLIS_MC, &blkszs[ BLIS_MC ], BLIS_MR,
BLIS_NR, &blkszs[ BLIS_NR ], BLIS_NR,
BLIS_MR, &blkszs[ BLIS_MR ], BLIS_MR,
// level-1f
BLIS_AF, &blkszs[ BLIS_AF ], BLIS_AF,
BLIS_DF, &blkszs[ BLIS_DF ], BLIS_DF,
cntx
);
}

View File

@@ -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, 144, -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.

View File

@@ -47,10 +47,12 @@ void bli_cntx_init_zen( cntx_t* cntx )
// their storage preferences.
bli_cntx_set_l3_nat_ukrs
(
6,
8,
// gemm
BLIS_GEMM_UKR, BLIS_FLOAT, bli_sgemm_zen_asm_6x16, TRUE,
BLIS_GEMM_UKR, BLIS_DOUBLE, bli_dgemm_zen_asm_6x8, TRUE,
BLIS_GEMM_UKR, BLIS_SCOMPLEX, bli_cgemm_zen_asm_3x8, TRUE,
BLIS_GEMM_UKR, BLIS_DCOMPLEX, bli_zgemm_zen_asm_3x4, TRUE,
// gemmtrsm_l
BLIS_GEMMTRSM_L_UKR, BLIS_FLOAT, bli_sgemmtrsm_l_zen_asm_6x16, TRUE,
BLIS_GEMMTRSM_L_UKR, BLIS_DOUBLE, bli_dgemmtrsm_l_zen_asm_6x8, TRUE,

View File

@@ -14,7 +14,7 @@ arm32: cortexa9 cortexa15 generic
x86_64: haswell sandybridge penryn zen excavator steamroller piledriver bulldozer generic
# Intel architectures.
haswell: haswell
haswell: haswell/haswell/zen
sandybridge: sandybridge
penryn: penryn
knl: knl

View File

@@ -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." );
}

View File

@@ -104,11 +104,12 @@ extern int32_t offsets[24];
void bli_dpackm_knl_asm_8xk
(
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_,
cntx_t* restrict cntx
)
{
(void)conja;
@@ -296,11 +297,12 @@ void bli_dpackm_knl_asm_8xk
void bli_dpackm_knl_asm_24xk
(
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_,
cntx_t* restrict cntx
)
{
(void)conja;

View File

@@ -132,11 +132,12 @@ extern int32_t offsets[32];
// NOTE: assumes packdim_mr == 32
void bli_dpackm_knl_asm_30xk
(
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_
conj_t conja,
dim_t n_,
void* restrict kappa_,
void* restrict a_, inc_t inca_, inc_t lda_,
void* restrict p_, inc_t ldp_,
cntx_t* restrict cntx
)
{
(void)conja;

View File

@@ -12,7 +12,7 @@
rc # Matrix storage scheme(s) to test:
# 'c' = col-major storage; 'g' = general stride storage;
# 'r' = row-major storage
c # Vector storage scheme(s) to test:
cj # Vector storage scheme(s) to test:
# 'c' = colvec / unit stride; 'j' = colvec / non-unit stride;
# 'r' = rowvec / unit stride; 'i' = rowvec / non-unit stride
0 # Test all combinations of storage schemes?

View File

@@ -17,16 +17,29 @@
#
# ENABLING/DISABLING INDIVIDUAL OPERATION TESTS
# Given that an operation's section override switch is set to 1
# (enabled, whether or not that operation will get tested is determined
# by its local switch. For example, if the level-1v section override is
# set to 1, and there is a 1 on the line marked "addv", then the addv
# operation will be tested. Similarly, a 0 would cause addv to not be
# tested. NOTE: You may ignore the lines marked "test sequential
# front-end." These lines are for future use, to distinguish tests of
# the sequential implementation from tests of the multithreaded
# implementation. For now, BLIS does not contain separate APIs for
# multithreaded execution, even though multithreading is supported.
# So, these should be left set to 1.
# (enabled), whether or not that operation will get tested is
# determined by its local switch. For example, if the level-1v section
# override is set to 1, and there is a 1 on the line marked "addv",
# then the addv operation will be tested. Similarly, a 0 would cause
# addv to not be tested. NOTE: You may ignore the lines marked "test
# sequential front-end." These lines are for future use, to
# distinguish tests of the sequential implementation from tests of
# the multithreaded implementation. For now, BLIS does not contain
# separate APIs for multithreaded execution, even though
# multithreading is supported. So, these should be left set to 1.
#
# ENABLING ONLY SELECT OPERATIONS
# If you would like to enable just a few (or even just one) operation
# without adjusting any section overrides (or individual operation
# switches), change the desired operation switch(es) to 2. This will
# cause any operation that is not set to 2 to be disabled, regardless
# of section override values. For example, setting the axpyv and gemv
# operation switches to 2 will cause the test suite to test ONLY axpyv
# and gemv, even if all other sections and operations are set to 1.
# NOTE: As long as there is at least on operation switch set to 2, no
# other operations will be tested. When you are done testing your
# select operations, you should revert the operation switch(es) back
# to 1.
#
# CHANGING PROBLEM SIZE/SHAPES TESTED
# The problem sizes tested by an operation are determined by the

View File

@@ -107,7 +107,7 @@ void libblis_test_addm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -106,7 +106,7 @@ void libblis_test_addv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -110,7 +110,7 @@ void libblis_test_amaxv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -117,7 +117,7 @@ void libblis_test_axpbyv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -117,7 +117,7 @@ void libblis_test_axpy2v
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1f_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -115,7 +115,7 @@ void libblis_test_axpyf
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1f_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -112,7 +112,7 @@ void libblis_test_axpym
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -112,7 +112,7 @@ void libblis_test_axpyv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -106,7 +106,7 @@ void libblis_test_copym
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -106,7 +106,7 @@ void libblis_test_copyv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -119,7 +119,7 @@ void libblis_test_dotaxpyv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1f_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -108,7 +108,7 @@ void libblis_test_dotv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -125,7 +125,7 @@ void libblis_test_dotxaxpyf
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1f_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -117,7 +117,7 @@ void libblis_test_dotxf
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1f_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -113,7 +113,7 @@ void libblis_test_dotxv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -119,7 +119,7 @@ void libblis_test_gemm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -120,7 +120,7 @@ void libblis_test_gemm_ukr
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3ukr_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -135,7 +135,7 @@ void libblis_test_gemmtrsm_ukr
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3ukr_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -116,7 +116,7 @@ void libblis_test_gemv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -114,7 +114,7 @@ void libblis_test_ger
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -122,7 +122,7 @@ void libblis_test_hemm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -117,7 +117,7 @@ void libblis_test_hemv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -114,7 +114,7 @@ void libblis_test_her
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -116,7 +116,7 @@ void libblis_test_her2
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -120,7 +120,7 @@ void libblis_test_her2k
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -118,7 +118,7 @@ void libblis_test_herk
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -204,9 +204,10 @@ void libblis_test_read_ops_file( char* input_filename, test_ops_t* ops )
input_stream = fopen( input_filename, "rb" );
libblis_test_fopen_check_stream( input_filename, input_stream );
// Begin reading operations input file.
// Initialize the individual override field to FALSE.
ops->indiv_over = FALSE;
// dimensions n_param operation
// Begin reading operations input file.
// Section overrides
libblis_test_read_section_override( ops, input_stream, &(ops->util_over) );
@@ -217,6 +218,8 @@ void libblis_test_read_ops_file( char* input_filename, test_ops_t* ops )
libblis_test_read_section_override( ops, input_stream, &(ops->l3ukr_over) );
libblis_test_read_section_override( ops, input_stream, &(ops->l3_over) );
// dimensions n_param operation
// Utility operations
libblis_test_read_op_info( ops, input_stream, BLIS_NOID, BLIS_TEST_DIMS_M, 0, &(ops->randv) );
libblis_test_read_op_info( ops, input_stream, BLIS_NOID, BLIS_TEST_DIMS_MN, 0, &(ops->randm) );
@@ -489,6 +492,12 @@ void libblis_test_read_op_info( test_ops_t* ops,
libblis_test_read_next_line( buffer, input_stream );
sscanf( buffer, "%d ", &(op->op_switch) );
// Check the op_switch for the individual override value.
if ( op->op_switch == ENABLE_ONLY )
{
ops->indiv_over = TRUE;
}
// Read the line for the sequential front-end/micro-kernel interface.
libblis_test_read_next_line( buffer, input_stream );
sscanf( buffer, "%d ", &(op->front_seq) );
@@ -2414,3 +2423,26 @@ void libblis_test_check_empty_problem( obj_t* c, double* perf, double* resid )
}
}
int libblis_test_op_is_disabled( test_op_t* op )
{
int r_val;
// If there was at least one individual override, then an op test is
// disabled if it is NOT equal to ENABLE_ONLY. If there were no
// individual overrides, then an op test is disabled if it is equal
// to DISABLE_ALL.
if ( op->ops->indiv_over == TRUE )
{
if ( op->op_switch != ENABLE_ONLY ) r_val = TRUE;
else r_val = FALSE;
}
else // if ( op->ops->indiv_over == FALSE )
{
if ( op->op_switch == DISABLE_ALL ) r_val = TRUE;
else r_val = FALSE;
}
return r_val;
}

View File

@@ -90,6 +90,7 @@
#define SPECIFY 1
#define DISABLE 0
#define ENABLE 1
#define ENABLE_ONLY 2
#define MAX_PARAM_VALS_PER_TYPE 4
@@ -200,6 +201,9 @@ typedef struct
typedef struct test_ops_s
{
// individual override
int indiv_over;
// section overrides
int util_over;
int l1v_over;
@@ -424,6 +428,7 @@ void libblis_test_parse_command_line( int argc, char** argv );
// --- Miscellaneous ---
void libblis_test_check_empty_problem( obj_t* c, double* perf, double* resid );
int libblis_test_op_is_disabled( test_op_t* op );
//

View File

@@ -105,7 +105,7 @@ void libblis_test_normfm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -105,7 +105,7 @@ void libblis_test_normfv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -102,7 +102,7 @@ void libblis_test_randm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->util_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -102,7 +102,7 @@ void libblis_test_randv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->util_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -111,7 +111,7 @@ void libblis_test_scal2m
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -111,7 +111,7 @@ void libblis_test_scal2v
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -107,7 +107,7 @@ void libblis_test_scalm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -108,7 +108,7 @@ void libblis_test_scalv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -104,7 +104,7 @@ void libblis_test_setm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -104,7 +104,7 @@ void libblis_test_setv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -107,7 +107,7 @@ void libblis_test_subm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1m_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -107,7 +107,7 @@ void libblis_test_subv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -122,7 +122,7 @@ void libblis_test_symm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -117,7 +117,7 @@ void libblis_test_symv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -114,7 +114,7 @@ void libblis_test_syr
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -116,7 +116,7 @@ void libblis_test_syr2
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -120,7 +120,7 @@ void libblis_test_syr2k
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -118,7 +118,7 @@ void libblis_test_syrk
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -118,7 +118,7 @@ void libblis_test_trmm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -122,7 +122,7 @@ void libblis_test_trmm3
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -113,7 +113,7 @@ void libblis_test_trmv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -118,7 +118,7 @@ void libblis_test_trsm
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -118,7 +118,7 @@ void libblis_test_trsm_ukr
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l3ukr_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -113,7 +113,7 @@ void libblis_test_trsv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l2_over == DISABLE_ALL ) return;
// Call dependencies first.

View File

@@ -111,7 +111,7 @@ void libblis_test_xpbyv
if ( op->test_done == TRUE ) return;
// Return early if operation is disabled.
if ( op->op_switch == DISABLE_ALL ||
if ( libblis_test_op_is_disabled( op ) ||
op->ops->l1v_over == DISABLE_ALL ) return;
// Call dependencies first.