From 23ceeff7ebff3d551d25f4d3524095be86817611 Mon Sep 17 00:00:00 2001 From: Meghana Vankadari Date: Fri, 24 Jul 2020 10:19:03 +0530 Subject: [PATCH] Using weighted thread range partitioning for GEMMT Details: - Since C is triangular, in order to maintain load balance among threads, we need to use weighted range partitioning. Change-Id: I03d8ff71ac7af843acd787f1389b5907b56453ee --- frame/thread/bli_thread.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/frame/thread/bli_thread.c b/frame/thread/bli_thread.c index 687e56afc..6a031c9d0 100644 --- a/frame/thread/bli_thread.c +++ b/frame/thread/bli_thread.c @@ -5,7 +5,7 @@ libraries. Copyright (C) 2014, The University of Texas at Austin - Copyright (C) 2018 - 2019, Advanced Micro Devices, Inc. + Copyright (C) 2018 - 2020, Advanced Micro Devices, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -677,10 +677,11 @@ siz_t bli_thread_range_mdim // function will mistakenly skip over unstored regions of the // structured matrix, even though they represent part of that matrix // that will be dense and full (after packing). - if ( family == BLIS_GEMM ) { x = a; use_weighted = FALSE; } - else if ( family == BLIS_HERK ) { x = c; use_weighted = TRUE; } - else if ( family == BLIS_TRMM ) { x = a; use_weighted = TRUE; } - else /*family == BLIS_TRSM*/ { x = a; use_weighted = FALSE; } + if ( family == BLIS_GEMM ) { x = a; use_weighted = FALSE; } + else if ( family == BLIS_HERK ) { x = c; use_weighted = TRUE; } + else if ( family == BLIS_GEMMT ) { x = c; use_weighted = TRUE; } + else if ( family == BLIS_TRMM ) { x = a; use_weighted = TRUE; } + else /*family == BLIS_TRSM*/ { x = a; use_weighted = FALSE; } if ( use_weighted ) { @@ -736,10 +737,11 @@ siz_t bli_thread_range_ndim // function will mistakenly skip over unstored regions of the // structured matrix, even though they represent part of that matrix // that will be dense and full (after packing). - if ( family == BLIS_GEMM ) { x = b; use_weighted = FALSE; } - else if ( family == BLIS_HERK ) { x = c; use_weighted = TRUE; } - else if ( family == BLIS_TRMM ) { x = b; use_weighted = TRUE; } - else /*family == BLIS_TRSM*/ { x = b; use_weighted = FALSE; } + if ( family == BLIS_GEMM ) { x = b; use_weighted = FALSE; } + else if ( family == BLIS_HERK ) { x = c; use_weighted = TRUE; } + else if ( family == BLIS_GEMMT ) { x = c; use_weighted = TRUE; } + else if ( family == BLIS_TRMM ) { x = b; use_weighted = TRUE; } + else /*family == BLIS_TRSM*/ { x = b; use_weighted = FALSE; } if ( use_weighted ) {