aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/eigen3
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-08-01 08:08:26 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-08-01 09:16:12 -0700
commitc0944a38a40956466f3e9b3a297c9994f7a2b7e6 (patch)
tree8189e7c34e7806c39bae1ee6b133cae223fbfc5d /third_party/eigen3
parent48e869f0e34c548df28f97d331e8755b372f2a23 (diff)
Add an op for singular value decomposition (SVD) of a dense matrix or batches of dense matrices. This calls Eigen::JacobiSVD<Matrix, Eigen::HouseholderQRPreconditioner> which is known to be rather slow. This change is primarily intended to get the TensorFlow interfaces and functionality in place. We intend to swap out the "backend" with a higher performance algorithm implementation in the future.
This CL also contains a small refactoring of the LinearAlgebraOp base class: 1. I moved the initial processing of inputs and outputs into separate helper functions so Compute() is not so long. 2. The derived classes are now allowed to return fewer output matrix shapes (n) than the number of op outputs (m) in which case empty (shape[0]) tensors are returned for the last m-n outputs. Fixed a few Python linter errors that were blocking presubmit. Change: 128990912
Diffstat (limited to 'third_party/eigen3')
-rw-r--r--third_party/eigen3/BUILD1
-rw-r--r--third_party/eigen3/Eigen/SVD38
2 files changed, 2 insertions, 37 deletions
diff --git a/third_party/eigen3/BUILD b/third_party/eigen3/BUILD
index 9062ed2ec0..15534fa961 100644
--- a/third_party/eigen3/BUILD
+++ b/third_party/eigen3/BUILD
@@ -8,6 +8,7 @@ cc_library(
"Eigen/Cholesky",
"Eigen/Eigenvalues",
"Eigen/QR",
+ "Eigen/SVD",
"unsupported/Eigen/SpecialFunctions",
"unsupported/Eigen/CXX11/Tensor",
"unsupported/Eigen/CXX11/FixedPoint",
diff --git a/third_party/eigen3/Eigen/SVD b/third_party/eigen3/Eigen/SVD
index fd310017ad..eecf47c103 100644
--- a/third_party/eigen3/Eigen/SVD
+++ b/third_party/eigen3/Eigen/SVD
@@ -1,37 +1 @@
-#ifndef EIGEN_SVD_MODULE_H
-#define EIGEN_SVD_MODULE_H
-
-#include "QR"
-#include "Householder"
-#include "Jacobi"
-
-#include "src/Core/util/DisableStupidWarnings.h"
-
-/** \defgroup SVD_Module SVD module
- *
- *
- *
- * This module provides SVD decomposition for matrices (both real and complex).
- * This decomposition is accessible via the following MatrixBase method:
- * - MatrixBase::jacobiSvd()
- *
- * \code
- * #include <Eigen/SVD>
- * \endcode
- */
-
-#include "src/misc/Solve.h"
-#include "src/SVD/JacobiSVD.h"
-#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
-#include "src/SVD/JacobiSVD_MKL.h"
-#endif
-#include "src/SVD/UpperBidiagonalization.h"
-
-#ifdef EIGEN2_SUPPORT
-#include "src/Eigen2Support/SVD.h"
-#endif
-
-#include "src/Core/util/ReenableStupidWarnings.h"
-
-#endif // EIGEN_SVD_MODULE_H
-/* vim: set filetype=cpp et sw=2 ts=2 ai: */
+#include "Eigen/SVD"