Merge "Checking for zero dimension is moved to bli_gemm_xx call." into amd-staging-rome-2.2

This commit is contained in:
Dipal Madhukar Zambare
2020-06-04 02:16:56 -04:00
committed by Gerrit Code Review
2 changed files with 14 additions and 9 deletions

View File

@@ -57,6 +57,19 @@ void PASTEMAC(opname,EX_SUF) \
bli_init_once(); \
\
BLIS_OAPI_EX_DECLS \
\
/* If C has a zero dimension, return early. */ \
if ( bli_obj_has_zero_dim( c ) ) return; \
\
/* if alpha or A or B has a zero dimension, \
scale C by beta and return early. */ \
if ( bli_obj_equals( alpha, &BLIS_ZERO ) || \
bli_obj_has_zero_dim( a ) || \
bli_obj_has_zero_dim( b ) ) \
{\
bli_scalm( beta, c ); \
return;\
}\
\
/* If the rntm is non-NULL, it may indicate that we should forgo sup
handling altogether. */ \

View File

@@ -56,15 +56,7 @@ void bli_gemm_front
// Check parameters.
if ( bli_error_checking_is_enabled() )
bli_gemm_check( alpha, a, b, beta, c, cntx );
// If alpha is zero, scale by beta and return.
if ( bli_obj_equals( alpha, &BLIS_ZERO ) )
{
bli_scalm( beta, c );
return;
}
#ifdef BLIS_ENABLE_SMALL_MATRIX
// Only handle small problems separately for homogeneous datatypes.
if ( bli_obj_dt( a ) == bli_obj_dt( b ) &&