From 66464bd2a8a9ed13274790e8bd3f6393e097554b Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Thu, 27 Jan 2022 20:35:53 +0000 Subject: [PATCH] Fix number of block columns to NOT overflow the cache (PowerPC) abnormally in GEMV --- Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h b/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h index 6e36dea3d..86ce4631d 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.h @@ -416,7 +416,7 @@ EIGEN_STRONG_INLINE void gemv_col( #endif // TODO: improve the following heuristic: - const Index block_cols = cols < 128 ? cols : (lhsStride * sizeof(LhsScalar) < 32000 ? 16 : 16); + const Index block_cols = cols < 128 ? cols : (lhsStride * sizeof(LhsScalar) < 16000 ? 16 : 8); ResPacket palpha = pset1(alpha); for (Index j2 = 0; j2 < cols; j2 += block_cols) @@ -1622,7 +1622,7 @@ EIGEN_STRONG_INLINE void gemv_complex_col( const Index n1 = rows - 1 * ResPacketSize + 1; // TODO: improve the following heuristic: - const Index block_cols = cols < 128 ? cols : (lhsStride * sizeof(LhsScalar) < 32000 ? 16 : 16); + const Index block_cols = cols < 128 ? cols : (lhsStride * sizeof(LhsScalar) < 16000 ? 16 : 8); typedef alpha_store AlphaData; AlphaData alpha_data(alpha);