Tweaks to test/3m4m to test with adjusted dims.

Details:
- Updated test/3m4m driver files to build test drivers that allow
  comparision of real "asm_blis" results to complex "asm_blis" results,
  except with the latter's problem sizes adjusted so that problems are
  generated with equal flop counts.
This commit is contained in:
Field G. Van Zee
2015-04-10 13:23:50 -05:00
parent 426b648858
commit ec25807b26
3 changed files with 55 additions and 10 deletions

View File

@@ -221,6 +221,9 @@ STR_NAT := -DSTR=\"asm\"
STR_OBL := -DSTR=\"openblas\"
STR_MKL := -DSTR=\"mkl\"
STR_ACML := -DSTR=\"acml\"
STR_AMK := -DSTR=\"amk\"
STR_AKN := -DSTR=\"akn\"
STR_AMN := -DSTR=\"amn\"
# Single or multithreaded string
STR_ST := -DTHR_STR=\"st\"
@@ -231,9 +234,13 @@ PDEF_ST := -DP_BEGIN=40 \
-DP_END=2000 \
-DP_INC=40
PDEF_MT := -DP_BEGIN=200 \
-DP_END=10000 \
-DP_INC=200
PDEF_MT := -DP_BEGIN=400 \
-DP_END=8000 \
-DP_INC=400
ADJ_MK := -DADJ_MK
ADJ_KN := -DADJ_KN
ADJ_MN := -DADJ_MN
@@ -274,7 +281,14 @@ blis: \
test_cgemm_4m1a_blis_st.x \
test_zgemm_4m1a_blis_st.x \
test_cgemm_asm_blis_st.x \
test_zgemm_asm_blis_st.x
test_zgemm_asm_blis_st.x \
\
test_cgemm_amk_blis_st.x \
test_zgemm_amk_blis_st.x \
test_cgemm_akn_blis_st.x \
test_zgemm_akn_blis_st.x \
test_cgemm_amn_blis_st.x \
test_zgemm_amn_blis_st.x
blis-mt: \
test_sgemm_asm_blis_mt.x \
@@ -444,6 +458,25 @@ test_z%_asm_blis_mt.o: test_%.c
test_c%_asm_blis_mt.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_MT) $(DT_C) $(BLI_DEF) $(DNAT) $(STR_NAT) $(STR_MT) -c $< -o $@
# blis asm (adjusted)
test_z%_amk_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_Z) $(BLI_DEF) $(DNAT) $(STR_AMK) $(STR_ST) $(ADJ_MK) -c $< -o $@
test_c%_amk_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_C) $(BLI_DEF) $(DNAT) $(STR_AMK) $(STR_ST) $(ADJ_MK) -c $< -o $@
test_z%_akn_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_Z) $(BLI_DEF) $(DNAT) $(STR_AKN) $(STR_ST) $(ADJ_KN) -c $< -o $@
test_c%_akn_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_C) $(BLI_DEF) $(DNAT) $(STR_AKN) $(STR_ST) $(ADJ_KN) -c $< -o $@
test_z%_amn_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_Z) $(BLI_DEF) $(DNAT) $(STR_AMN) $(STR_ST) $(ADJ_MN) -c $< -o $@
test_c%_amn_blis_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_C) $(BLI_DEF) $(DNAT) $(STR_AMN) $(STR_ST) $(ADJ_MN) -c $< -o $@
# openblas
test_z%_openblas_st.o: test_%.c
$(CC) $(CFLAGS) $(PDEF_ST) $(DT_Z) $(BLA_DEF) $(DNAT) $(STR_OBL) $(STR_ST) -c $< -o $@

View File

@@ -43,8 +43,8 @@ elif [ ${sys} = "wahlberg" ]; then
fi
# Threadedness to test.
threads="st mt"
threads_r="st mt"
threads="st" # mt"
threads_r="st" # mt"
# Datatypes to test.
dts="z c"
@@ -59,11 +59,14 @@ test_ops_r="${l3_ops}"
if [ ${sys} = "stampede" ]; then
test_impls="openblas mkl asm_blis 3mhw_blis 3m3_blis 3m2_blis 3m1_blis 4mhw_blis 4m1b_blis 4m1a_blis"
#test_impls="openblas mkl asm_blis"
elif [ ${sys} = "wahlberg" ]; then
test_impls="openblas acml asm_blis 3mhw_blis 3m3_blis 3m2_blis 3m1_blis 4mhw_blis 4m1b_blis 4m1a_blis"
#test_impls="openblas acml asm_blis"
fi
test_impls="asm_blis amk_blis akn_blis amn_blis"
# Real domain implementations to test.
test_impls_r="asm_blis"

View File

@@ -78,7 +78,7 @@ int main( int argc, char** argv )
m_input = -1;
n_input = -1;
k_input = 1;
k_input = -1;
// Extract the kc blocksize for the requested datatype and its
// real analogue.
@@ -93,6 +93,15 @@ int main( int argc, char** argv )
else if ( IND == BLIS_4M1A ) k_input = kc_real / 2;
else k_input = kc_real;
// Adjust the relative dimensions, if requested.
#if (defined ADJ_MK)
m_input = -2; k_input = -2; n_input = -1;
#elif (defined ADJ_KN)
k_input = -2; n_input = -2; m_input = -1;
#elif (defined ADJ_MN)
m_input = -2; n_input = -2; k_input = -1;
#endif
// Choose the char corresponding to the requested datatype.
if ( bli_is_float( dt ) ) dt_ch = 's';
else if ( bli_is_double( dt ) ) dt_ch = 'd';
@@ -122,11 +131,11 @@ int main( int argc, char** argv )
for ( p = p_begin; p <= p_end; p += p_inc )
{
if ( m_input < 0 ) m = p * ( dim_t )abs(m_input);
if ( m_input < 0 ) m = p / ( dim_t )abs(m_input);
else m = ( dim_t ) m_input;
if ( n_input < 0 ) n = p * ( dim_t )abs(n_input);
if ( n_input < 0 ) n = p / ( dim_t )abs(n_input);
else n = ( dim_t ) n_input;
if ( k_input < 0 ) k = p * ( dim_t )abs(k_input);
if ( k_input < 0 ) k = p / ( dim_t )abs(k_input);
else k = ( dim_t ) k_input;
bli_obj_create( dt, 1, 1, 0, 0, &alpha );