Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not specialize eigen convolution classes for ppc64le arch #47768

Merged
merged 1 commit into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tensorflow/core/kernels/eigen_cuboid_convolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ limitations under the License.

#include "tensorflow/core/kernels/eigen_convolution_helpers.h"

#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
#define TF_USE_CUSTOM_EIGEN_PACK 0
#else
#define TF_USE_CUSTOM_EIGEN_PACK 1
#endif

namespace Eigen {

namespace internal {

#if TF_USE_CUSTOM_EIGEN_PACK
// WARNING: Most of the code here implicitly assumes that the matrix is in
// ColMajor layout. This is guaranteed by the tensor contraction (see
// TensorContraction.h).
Expand Down Expand Up @@ -1625,6 +1632,7 @@ struct gemm_pack_rhs<
}
}
};
#endif

#if defined(TENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL)
// Pack a block of the right input matrix (in our case it's always a "virtual
Expand Down
8 changes: 8 additions & 0 deletions tensorflow/core/kernels/eigen_spatial_convolutions-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@ limitations under the License.

#include "tensorflow/core/kernels/eigen_convolution_helpers.h"

#if defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
#define TF_USE_CUSTOM_EIGEN_PACK 0
#else
#define TF_USE_CUSTOM_EIGEN_PACK 1
#endif

// Note this header is used in both TF and TFLite.
namespace Eigen {

namespace internal {

#if TF_USE_CUSTOM_EIGEN_PACK
// WARNING: Most of the code here implicitly assumes that the matrix is in
// ColMajor layout. This is guaranteed by the tensor contraction (see
// TensorContraction.h).
Expand Down Expand Up @@ -1532,6 +1539,7 @@ struct gemm_pack_rhs<
}
}
};
#endif
} // end namespace internal

/** SpatialConvolution
Expand Down