From dc2d6ee7631d898bef21f356b8764aea5b1bc407 Mon Sep 17 00:00:00 2001 From: Meghana Vankadari Date: Fri, 7 May 2021 12:04:23 +0530 Subject: [PATCH] Moved dynamic threading function from GEMMT to GEMM Details: - Current tuning for choosing optimal number of threads is done for GEMM. - Dynamic thread calculation function was placed in gemmt code flow instead of gemm by mistake. Fixing it with this commit. AMD-Internal: [CPUPL-1376] Change-Id: Iccb42a7a617b9b4cdb4c4af9be21aa82aaaabbcc --- frame/3/bli_l3_sup_ref.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/frame/3/bli_l3_sup_ref.c b/frame/3/bli_l3_sup_ref.c index 49081bd9e..885467979 100644 --- a/frame/3/bli_l3_sup_ref.c +++ b/frame/3/bli_l3_sup_ref.c @@ -89,6 +89,13 @@ err_t bli_gemmsup_ref // return from the parallel/threaded region. if ( stor_id == BLIS_XXX ) return BLIS_FAILURE; +#ifdef AOCL_DYNAMIC + // If dynamic-threading is enabled, calculate optimum number + // of threads. + // rntm will be updated with optimum number of threads. + bli_nthreads_optimum(a, b, c, BLIS_GEMM, rntm ); +#endif + // Parse and interpret the contents of the rntm_t object to properly // set the ways of parallelism for each loop. bli_rntm_set_ways_from_rntm_sup @@ -165,12 +172,6 @@ err_t bli_gemmtsup_ref bli_scalm( beta, c ); return BLIS_SUCCESS; } -#endif -#ifdef AOCL_DYNAMIC - // If dynamic-threading is enabled, calculate optimum number - // of threads. - // rntm will be updated with optimum number of threads. - bli_nthreads_optimum(a, b, c, BLIS_GEMM, rntm ); #endif // Parse and interpret the contents of the rntm_t object to properly // set the ways of parallelism for each loop.