From 91e99ec1e02100d07e35a7abb1b5c76707237219 Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Wed, 30 Jun 2021 23:05:04 +0000 Subject: Create the ability to disable the specialized gemm_pack_rhs in Eigen (only PPC) for TensorFlow --- Eigen/src/Core/arch/AltiVec/MatrixProduct.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h index 4c5cf1762..454b36cd6 100644 --- a/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +++ b/Eigen/src/Core/arch/AltiVec/MatrixProduct.h @@ -11,6 +11,10 @@ #ifndef EIGEN_MATRIX_PRODUCT_ALTIVEC_H #define EIGEN_MATRIX_PRODUCT_ALTIVEC_H +#ifndef EIGEN_ALTIVEC_USE_CUSTOM_PACK +#define EIGEN_ALTIVEC_USE_CUSTOM_PACK 1 +#endif + #include "MatrixProductCommon.h" // Since LLVM doesn't support dynamic dispatching, force either always MMA or VSX @@ -2423,6 +2427,7 @@ void gemm_pack_lhs struct gemm_pack_rhs { @@ -2450,6 +2455,7 @@ void gemm_pack_rhs pack; pack(blockB, rhs, depth, cols, stride, offset); } +#endif template struct gemm_pack_lhs @@ -2478,6 +2484,7 @@ void gemm_pack_lhs pack; pack(blockA, lhs, depth, rows, stride, offset); } + template struct gemm_pack_lhs, Index, DataMapper, Pack1, Pack2, Packet, RowMajor, Conjugate, PanelMode> { @@ -2506,6 +2513,7 @@ void gemm_pack_lhs, Index, DataMapper, Pack1, Pack2, Packet, pack(blockA, lhs, depth, rows, stride, offset); } +#if EIGEN_ALTIVEC_USE_CUSTOM_PACK template struct gemm_pack_rhs { @@ -2533,6 +2541,7 @@ void gemm_pack_rhs dhs_pack pack; pack(blockB, rhs, depth, cols, stride, offset); } +#endif template struct gemm_pack_rhs, Index, DataMapper, nr, ColMajor, Conjugate, PanelMode> -- cgit v1.2.3