Skip to content

Commit

Permalink
Building BDC-SVD templates OOMs on 32 Bit ARM hardware
Browse files Browse the repository at this point in the history
Adding conditional with fallback to Jacobi-SVD
  • Loading branch information
besser82 committed May 26, 2018
1 parent 4666249 commit 81422f7
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -141,7 +141,14 @@ void LinalgBackendEigen::svd_impl(
{
case linalg::SVDAlgorithm::BidiagonalDivideConquer:
{
#if EIGEN_VERSION_AT_LEAST(3, 3, 0)
// Building BDC-SVD templates OOMs on 32 Bit ARM hardware
#if (defined(__arm__) || defined (__thumb__) || defined(__TARGET_ARCH_ARM) || \
defined(__TARGET_ARCH_THUMB) || defined (_ARM) || defined(_M_ARM) || \
defined(_M_ARMT) || defined(__arm))) && !defined(__aarch64__)
SG_SWARNING(
"BDC-SVD is not supported on 32 Bit ARM hardware.\n"
"Falling back on Jacobi-SVD.\n")
#elif EIGEN_VERSION_AT_LEAST(3, 3, 0)
auto svd_eig =
A_eig.bdcSvd(thin_U ? Eigen::ComputeThinU : Eigen::ComputeFullU);
s_eig = svd_eig.singularValues().template cast<T>();
Expand Down

0 comments on commit 81422f7

Please sign in to comment.