-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify and rewrite reference packm kernels. (#610)
Details: - Reorganized the way kernels are stored within the cntx_t structure so that rather than having a function pointer for every supported size of unrolled packm kernel (2xk, 3xk, 4xk, etc.), we store only two packm kernels per datatype: one to pack MRxk micropanels and one to pack NRxk micropanels. - NOTE: The "bb" (broadcast B) reference kernels have been merged into the "standard" kernels (packm [including 1er and unpackm], gemm, trsm, gemmtrsm). This replication factor is controlled by BLIS_BB[MN]_[sdcz] etc. Power9/10 needs testing since only a replication factor of 1 has been tested. armsve also needs testing since the MR value isn't available as a macro. - Simplified the bli_cntx_*() APIs to conform to the new unified kernel array within the cntx_t. Updated existing bli_cntx_init_<subconfig>() function definitions for all subconfigurations. - Consolidated all kernel id types (e.g. l1vkr_t, l1mkr_t, l3ukr_t, etc.) into one kernel id type: ukr_t. - Various edits, updates, and rewrites of reference kernels pursuant to the aforementioned changes. - Define compile-time macro constants (BLIS_MR_[sdcz], BLIS_NR_[sdcz], and friends) in bli_kernel_macro_defs.h, but only when the macro BLIS_IN_REF_KERNEL is defined by the build system. - Loose ends: - Still need to update documentation, including: - docs/ConfigurationHowTo.md - docs/KernelsHowTo.md to reflect changes made in this commit. - (cherry picked from commit ae10d94) Fixed type bug in bli_cntx_set_ukr_prefs(). Details: - Fixed a bug in bli_cntx_set_ukr_prefs() which erroneously typecast the num_t value read from va_args() down to a bool before being stored within the cntx_t. This bug was introduced on April 6th 2022, in ae10d94. This caused the ukernel preferences for double real and double complex to go unchanged while the preferences for single real and single complex were corrupted by the former datatypes' preference values. The bug manifested as degraded performance for subconfigurations that registered column-preferential ukernels. The reason is that the erroneous preferences trigger unnecessary transpositions in the operation, which forces the gemm ukernel to compute on matrices that are not stored according to its preference. Thanks to Devin Matthews, Jeff Diamond, and Leick Robinson for their extensive efforts and assistance in tracking down this issue. - Augmented the informational header that is output by the testsuite to include ukernel preferences for gemm, gemmtrsm_[lu], and trsm_[lu]. - CREDITS file update. - (cherry picked from commit 667f201)
- Loading branch information
Showing
220 changed files
with
5,362 additions
and
10,285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
BLIS | ||
An object-based framework for developing high-performance BLAS-like | ||
libraries. | ||
Copyright (C) 2022, The University of Texas at Austin | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
- Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
- Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
- Neither the name(s) of the copyright holder(s) nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
//#ifndef BLIS_KERNEL_DEFS_H | ||
//#define BLIS_KERNEL_DEFS_H | ||
|
||
|
||
// -- REGISTER BLOCK SIZES (FOR REFERENCE KERNELS) ---------------------------- | ||
|
||
#define BLIS_MR_s 32 | ||
#define BLIS_MR_d 16 | ||
#define BLIS_MR_c 16 | ||
#define BLIS_MR_z 8 | ||
|
||
#define BLIS_NR_s 10 | ||
#define BLIS_NR_d 10 | ||
#define BLIS_NR_c 10 | ||
#define BLIS_NR_z 10 | ||
|
||
//#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
BLIS | ||
An object-based framework for developing high-performance BLAS-like | ||
libraries. | ||
Copyright (C) 2022, The University of Texas at Austin | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
- Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
- Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
- Neither the name(s) of the copyright holder(s) nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
//#ifndef BLIS_KERNEL_DEFS_H | ||
//#define BLIS_KERNEL_DEFS_H | ||
|
||
|
||
// -- REGISTER BLOCK SIZES (FOR REFERENCE KERNELS) ---------------------------- | ||
|
||
#define BLIS_MR_s 8 | ||
#define BLIS_MR_d 6 | ||
|
||
#define BLIS_NR_s 12 | ||
#define BLIS_NR_d 8 | ||
|
||
//#endif | ||
|
Oops, something went wrong.