From 2cb25ab1a94f3fe32bc6e00144c278373e404eaa Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 27 Jan 2016 10:48:23 -0800 Subject: Upgraded to a newer version of Eigen that fixes a compilation error when compiling with nvcc and clang --- third_party/eigen3/Eigen/Cholesky | 2 +- third_party/eigen3/Eigen/Core | 2 +- third_party/eigen3/Eigen/Eigenvalues | 2 +- third_party/eigen3/Eigen/LU | 2 +- third_party/eigen3/Eigen/QR | 2 +- third_party/eigen3/unsupported/Eigen/CXX11/Tensor | 2 +- .../Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h | 57 +++++++++++++--------- .../CXX11/src/NeuralNetworks/SpatialConvolutions.h | 15 +++--- 8 files changed, 48 insertions(+), 36 deletions(-) (limited to 'third_party/eigen3') diff --git a/third_party/eigen3/Eigen/Cholesky b/third_party/eigen3/Eigen/Cholesky index e12ca76fb9..fc0591af8a 100644 --- a/third_party/eigen3/Eigen/Cholesky +++ b/third_party/eigen3/Eigen/Cholesky @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/Eigen/Cholesky" +#include "external/eigen_archive/eigen-eigen-b45554449873/Eigen/Cholesky" diff --git a/third_party/eigen3/Eigen/Core b/third_party/eigen3/Eigen/Core index 4cf93eb97d..5e9bea90bc 100644 --- a/third_party/eigen3/Eigen/Core +++ b/third_party/eigen3/Eigen/Core @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/Eigen/Core" +#include "external/eigen_archive/eigen-eigen-b45554449873/Eigen/Core" diff --git a/third_party/eigen3/Eigen/Eigenvalues b/third_party/eigen3/Eigen/Eigenvalues index 3eb6c6f09d..f00f86e890 100644 --- a/third_party/eigen3/Eigen/Eigenvalues +++ b/third_party/eigen3/Eigen/Eigenvalues @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/Eigen/Eigenvalues" +#include "external/eigen_archive/eigen-eigen-b45554449873/Eigen/Eigenvalues" diff --git a/third_party/eigen3/Eigen/LU b/third_party/eigen3/Eigen/LU index fb2f42d69e..396b3ac7df 100644 --- a/third_party/eigen3/Eigen/LU +++ b/third_party/eigen3/Eigen/LU @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/Eigen/LU" +#include "external/eigen_archive/eigen-eigen-b45554449873/Eigen/LU" diff --git a/third_party/eigen3/Eigen/QR b/third_party/eigen3/Eigen/QR index b25b5b2b95..2066728724 100644 --- a/third_party/eigen3/Eigen/QR +++ b/third_party/eigen3/Eigen/QR @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/Eigen/QR" +#include "external/eigen_archive/eigen-eigen-b45554449873/Eigen/QR" diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor b/third_party/eigen3/unsupported/Eigen/CXX11/Tensor index ed198435a4..19b44c8d49 100644 --- a/third_party/eigen3/unsupported/Eigen/CXX11/Tensor +++ b/third_party/eigen3/unsupported/Eigen/CXX11/Tensor @@ -1 +1 @@ -#include "external/eigen_archive/eigen-eigen-fb2fa0527077/unsupported/Eigen/CXX11/Tensor" +#include "external/eigen_archive/eigen-eigen-b45554449873/unsupported/Eigen/CXX11/Tensor" diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h index d561b79fbd..6b4b0edcfb 100644 --- a/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h +++ b/third_party/eigen3/unsupported/Eigen/CXX11/src/FixedPoint/MatMatProductAVX2.h @@ -42,39 +42,50 @@ public: // Specialized blocking for quantized implementations. // Used by TensorContractionThreadPool, inputs must have dimensions that are // multiples of 32. -template -struct ComputeGemmByColBlockingSizes { - void operator()(Index& k, Index& m, Index& n, Index num_threads) +template +class TensorContractionBlocking, TensorContractionInputMapper, Index, ShardingType> { + public: + + typedef QInt8 LhsScalar; + typedef QUInt8 RhsScalar; + + TensorContractionBlocking(Index k, Index m, Index n, Index num_threads = 1) : + kc_(k), mc_(m), nc_(n) { eigen_assert(m % 32 == 0); - eigen_assert(n % 32 == 0); eigen_assert(k % 32 == 0); if (!k || !m || !n) { return; } - n = (((n / num_threads) + 31) / 32) * 32; - } -}; -// Specialized blocking for quantized implementations. -// Used by TensorContractionThreadPool, inputs must have dimensions that are -// multiples of 32. -template -struct ComputeGemmByRowBlockingSizes { - void operator()(Index& k, Index& m, Index& n, Index num_threads) - { - eigen_assert(m % 32 == 0); - eigen_assert(n % 32 == 0 || n == 1); - eigen_assert(k % 32 == 0); - if (!k || !m || !n) { - return; + if (ShardingType == ShardByCol) { + eigen_assert(n % 32 == 0); + nc_ = (((n / num_threads) + 31) / 32) * 32; } - // Special case to avoid breaking the unimplemented matrix-vector case - if (n == 1) { - n = 32; + else { + eigen_assert(n % 32 == 0 || n == 1); + // Special case to avoid breaking the unimplemented matrix-vector case + if (n == 1) { + nc_ = 32; + } + mc_ = (((m / num_threads) + 31) / 32) * 32; } - m = (((m / num_threads) + 31) / 32) * 32; } + + EIGEN_ALWAYS_INLINE Index kc() const { return kc_; } + EIGEN_ALWAYS_INLINE Index mc() const { return mc_; } + EIGEN_ALWAYS_INLINE Index nc() const { return nc_; } + + private: + Index kc_; + Index mc_; + Index nc_; }; // Specialized blocking for quantized implementations. diff --git a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h index fabdba641d..8e2ddca6b5 100644 --- a/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h +++ b/third_party/eigen3/unsupported/Eigen/CXX11/src/NeuralNetworks/SpatialConvolutions.h @@ -19,17 +19,18 @@ namespace internal { // TODO: Consolidate this part of the code with the image patch extraction code // since they are both very similar. template -class TensorContractionInputMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> +class TensorContractionInputMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> { public: - typedef TensorContractionInputMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> Self; - typedef TensorContractionSubMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> SubMapper; + typedef TensorContractionInputMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> Self; + typedef TensorContractionSubMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> SubMapper; typedef SubMapper VectorMapper; typedef SubMapper LinearMapper; + typedef Scalar_ Scalar; typedef typename packet_traits::type Packet; TensorContractionInputMapper(const TensorEvaluator >, Device>& tensor, @@ -371,14 +372,14 @@ class TensorContractionInputMapper -class TensorContractionSubMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> +class TensorContractionSubMapper >, Device>, nocontract_t, contract_t, packet_size, inner_dim_contiguous, inner_dim_reordered, Alignment> { public: - public: + typedef Scalar_ Scalar; typedef typename packet_traits::type Packet; typedef typename packet_traits::half HalfPacket; -- cgit v1.2.3