diff --git a/compute/zgemm.c b/compute/zgemm.c index d8892fe79051e2a27f9d2a45e2db435c00549f80..a567d94e034b8b817adb44329450fc95361b9f69 100644 --- a/compute/zgemm.c +++ b/compute/zgemm.c @@ -174,6 +174,17 @@ void *CHAMELEON_zgemm_WS_Alloc( cham_trans_t transA __attribute__((unused) assert( options->alg != ChamGemmAlgAuto ); + /* Switch back to generic if descriptors are not 2dbc */ + if ( options->alg == ChamGemmAlgSummaC ) + { + if ( (A->get_rankof_init != chameleon_getrankof_2d) || + (B->get_rankof_init != chameleon_getrankof_2d) || + (C->get_rankof_init != chameleon_getrankof_2d) ) + { + options->alg = ChamGemmAlgGeneric; + } + } + /* Now that we have decided which algorithm, let's allocate the required data structures. */ if ( options->alg == ChamGemmAlgSummaC ) { diff --git a/compute/zhemm.c b/compute/zhemm.c index 8b01715c4480010e0fc0db4a97959b64cf0ca771..920d1126ad0c38e952827acbfedaa4150ddd2d88 100644 --- a/compute/zhemm.c +++ b/compute/zhemm.c @@ -149,6 +149,17 @@ void *CHAMELEON_zhemm_WS_Alloc( cham_side_t side __attribute__((unused)), assert( options->alg != ChamGemmAlgAuto ); + /* Switch back to generic if descriptors are not 2dbc */ + if ( options->alg == ChamGemmAlgSummaC ) + { + if ( (A->get_rankof_init != chameleon_getrankof_2d) || + (B->get_rankof_init != chameleon_getrankof_2d) || + (C->get_rankof_init != chameleon_getrankof_2d) ) + { + options->alg = ChamGemmAlgGeneric; + } + } + /* Now that we have decided which algorithm, let's allocate the required data structures. */ if ( (options->alg == ChamGemmAlgSummaC ) && (C->get_rankof_init == chameleon_getrankof_2d ) ) diff --git a/compute/zsymm.c b/compute/zsymm.c index f493497b8dec3be6f7f6de79bfc9c4c654e0ca36..4942269cf5b5d87c3974f56e1a92fb2192fae381 100644 --- a/compute/zsymm.c +++ b/compute/zsymm.c @@ -149,6 +149,17 @@ void *CHAMELEON_zsymm_WS_Alloc( cham_side_t side __attribute__((unused)), assert( options->alg != ChamGemmAlgAuto ); + /* Switch back to generic if descriptors are not 2dbc */ + if ( options->alg == ChamGemmAlgSummaC ) + { + if ( (A->get_rankof_init != chameleon_getrankof_2d) || + (B->get_rankof_init != chameleon_getrankof_2d) || + (C->get_rankof_init != chameleon_getrankof_2d) ) + { + options->alg = ChamGemmAlgGeneric; + } + } + /* Now that we have decided which algorithm, let's allocate the required data structures. */ if ( (options->alg == ChamGemmAlgSummaC ) && (C->get_rankof_init == chameleon_getrankof_2d ) )