11542 Commits

Author SHA1 Message Date
Antonio Sánchez
cd543434bf Fix gcc-5 packetmath_12 bug.
(cherry picked from commit 897071977177ef0fd392861655ba1ad47546a265)
2023-07-07 11:46:15 -07:00
Antonio Sánchez
36be6747e0 Modify test expression to avoid numerical differences (#2402).
(cherry picked from commit ae86a146b1ac9a49bf72e485254c08d237fd094a)
2023-07-07 11:45:56 -07:00
Martin Heistermann
d1ed3fe5c9 Fix for crash bug in SPQRSupport: Initialize pointers to nullptr to avoid free() calls of invalid pointers.
(cherry picked from commit 550af3938cc46116435f3dd88a9cdc94837d7542)
2023-07-07 11:44:55 -07:00
Antonio Sanchez
21e0ad056e Fix ODR failures in TensorRandom.
(cherry picked from commit bded5028a5bd112181b94b2a246ac2c20e671c2f)
2023-07-07 11:43:03 -07:00
Antonio Sánchez
709d704819 Fix collision with resolve.h.
(cherry picked from commit 94bed2b80c8ed7a4293a0d16afd11e617e447eeb)
2023-07-07 11:40:44 -07:00
Antonio Sánchez
995714142d Restrict GCC<6.3 maxpd workaround to only gcc.
(cherry picked from commit 4bffbe84f9125fc05bc781bf2ec87ada73ecf7f2)
2023-07-07 11:39:27 -07:00
Antonio Sánchez
730a781221 Define EIGEN_HAS_AVX512_MATH in PacketMath.
(cherry picked from commit e7f4a901ee8cbe42d37bcabefb342086235c3839)
2023-07-07 11:39:13 -07:00
Antonio Sánchez
77b2807322 Fix AVX512 math function consistency, enable for ICC.
(cherry picked from commit 96da541cba007a84979ee5e3000c13eab982d56c)
2023-07-07 11:37:49 -07:00
Antonio Sánchez
52e545324e Fix ODR violations.
(cherry picked from commit cafeadffef2a7ba41f2da5cf34c38068d74499eb)
2023-07-07 11:37:31 -07:00
Stephen Pierce
0cd4719f3e Silence some MSVC warnings
(cherry picked from commit 81c928ba55af78333d7446a55e3a0a36a4992c0e)
2023-07-07 11:30:40 -07:00
Erik Schultheis
770ed0794e fix broken asserts
(cherry picked from commit 5a0a165c095aa12e5a4f188c56543f33ea546239)
2023-07-07 11:25:03 -07:00
Antonio Sánchez
e7248b26a1 Prevent BDCSVD crash caused by index out of bounds.
(cherry picked from commit 028ab12586ee1244755455107fcba66493b336d6)
2022-05-19 22:30:33 +00:00
Antonio Sanchez
a1e1612c28 Fix cwise NaN propagation for scalar input.
Was missing a template parameter.  Updated tests.

Fixes #2474.
2022-04-15 22:11:22 -07:00
Antonio Sánchez
f3aaba8705 Revert "Replace call to FixedDimensions() with a singleton instance of"
This reverts commit 19e6496ce0c52fef33265bca54285ba77b2155be

(cherry picked from commit f7b31f864c0dec7872038cab79f6e677de2ecc71)
2022-04-10 15:34:11 +00:00
Antonio Sánchez
34e5f34b39 Update warning suppression to latest. 2022-03-21 15:56:03 +00:00
Antonio Sánchez
4612627355 Revert "ensure that eigen::internal::size is not found by ADL, rename to ssize and..."
This reverts commit bd72e4a8c4f2bc41d3b4a87be7d5e850efaa461d
2022-01-18 16:08:59 +00:00
Antonio Sánchez
3e71c621c9 Revert "fix compilation issue with gcc < 10 and -std=c++2a"
This reverts commit b5d218d8574c665d7d4ac3ac21f7bf15b8dabbfa
2022-01-18 16:08:37 +00:00
Jörg Buchwald
b5d218d857 fix compilation issue with gcc < 10 and -std=c++2a
(cherry picked from commit d1bf05639476adbb222e8d09da2faf6ef1ed66f2)
2022-01-13 01:43:43 +00:00
Erik Schultheis
bd72e4a8c4 ensure that eigen::internal::size is not found by ADL, rename to ssize and...
(cherry picked from commit 9210e71fb378a0f1542272506dc2759b6c147237)
2022-01-11 16:43:21 +00:00
David Tellenbach
3af8c262ac Include immintrin.h if F16C is available and vectorization is disabled
If EIGEN_DONT_VECTORIZE is defined, immintrin.h is not included even if F16C is available. Trying to use F16C intrinsics thus fails.

This fixes issue #2395.

(cherry picked from commit c06c3e52a082e403e7a241350fd867e907c833dc)
2021-12-25 22:53:23 +01:00
Antonio Sanchez
7e3bc4177e Fix tensor broadcast off-by-one error.
Caught by JAX unit tests.  Triggered if broadcast is smaller than packet
size.


(cherry picked from commit ffb78e23a1b3bc232a07773144cfa5fa1759852d)
2021-11-16 18:41:25 +00:00
Minh Quan HO
c379a21191 nestbyvalue test: fix uninitialized matrix
- Doing computation with uninitialized (zero-ed ? but thanks Linux) matrix, or
worse NaN on other non-linux systems.
- This commit fixes it by initializing to Random().


(cherry picked from commit 4284c68fbb81cb069a630ae1bf4a953ee922f6e5)
2021-11-05 18:19:27 +00:00
Gengxin Xie
6f57470bcc Bug Fix: correct the bug that won't define EIGEN_HAS_FP16_C
if the compiler isn't clang


(cherry picked from commit 5c642950a5d0232ebdfa6b460b4515e6e2b8828d)
2021-11-04 22:54:01 +00:00
Lennart Steffen
df53e28179 Included note on inner stride for compile-time vectors. See https://gitlab.com/libeigen/eigen/-/issues/2355#note_711078126
(cherry picked from commit 163f11e24a1011ac8ba1cecfaf53e9b11ace5f5c)
2021-11-03 23:35:40 +00:00
Chip Kerchner
fbdaff81bd Invert rows and depth in non-vectorized portion of packing (PowerPC).
(cherry picked from commit 9cf34ee0aed25a7464e6ec14f977cfa940f48f1b)
2021-11-03 23:34:47 +00:00
Nico
71320af66a Fix -Wbitwise-instead-of-logical clang warning
& and | short-circuit, && and || don't. When both arguments to those
are boolean, the short-circuiting version is usually the desired one, so
clang warns on this.

Here, it is inconsequential, so switch to && and || to suppress the warning.

(cherry picked from commit b17bcddbca749f621040990a3efb840046315050)
2021-11-03 23:32:57 +00:00
Maxiwell S. Garcia
962a596d21 test: fix boostmutiprec test to compile with older Boost versions
Eigen boostmultiprec test redefines a symbol that is already defined
inside Boot Math [1]. Boost has fixed it recently [2], but this
patch avoids errors if Boost version was less than 1.77.

https://github.com/boostorg/math/blob/boost-1.76.0/include/boost/math/policies/policy.hpp#L18
6830712302 (diff-c7a8e5911c2e6be4138e1a966d762200f147792ac16ad96fdcc724313d11f839)


(cherry picked from commit 99600bd1a6b133f8684800c855e59d4fd22ac23e)
2021-11-03 23:31:48 +00:00
Antonio Sanchez
0ab1f8ec03 Fix broadcasting oob error.
For vectorized 1-dimensional inputs that do not take the special
blocking path (e.g. `std::complex<...>`), there was an
index-out-of-bounds error causing the broadcast size to be
computed incorrectly.  Here we fix this, and make other minor
cleanup changes.

Fixes #2351.


(cherry picked from commit a500da1dc089b08e2f2b3b05a2eb23194425460e)
2021-11-03 23:30:47 +00:00
Alex Druinsky
b0fe14213e Fix vectorized reductions for Eigen::half
Fixes compiler errors in expressions that look like

  Eigen::Matrix<Eigen::half, 3, 1>::Random().maxCoeff()

The error comes from the code that creates the initial value for
vectorized reductions. The fix is to specify the scalar type of the
reduction's initial value.

The cahnge is necessary for Eigen::half because unlike other types,
Eigen::half scalars cannot be implicitly created from integers.


(cherry picked from commit d0e3791b1a0e2db9edd5f1d1befdb2ac5a40efe0)
2021-11-03 23:29:55 +00:00
Andreas Krebbel
23469c3cda ZVector: Move alignas qualifier to come first
We currently have plenty of type definitions with the alignment
qualifier coming after the type.  The compiler warns about ignoring
them:
int EIGEN_ALIGN16 ai[4];

Turn this into:
EIGEN_ALIGN16 int ai[4];


(cherry picked from commit 8faafc3aaa2b45e234cfe0bef085c1134ceffc42)
2021-11-03 23:29:10 +00:00
Antonio Sanchez
18824d10ea Fix ZVector build.
Cross-compiled via `s390x-linux-gnu-g++`, run via qemu.  This allows the
packetmath tests to pass.


(cherry picked from commit 40bbe8a4d0eb3ec2bfd472fa30cac19e6e743b46)
2021-11-03 23:28:26 +00:00
Antonio Sanchez
f9b2e92040 Remove bad "take" impl that causes g++-11 crash.
For some reason, having `take<n, numeric_list<T>>` for `n > 0` causes
g++-11 to ICE with
```
sorry, unimplemented: unexpected AST of kind nontype_argument_pack
```
It does work with other versions of gcc, and with clang.
I filed a GCC bug
[here](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102999).

Technically we should never actually run into this case, since you
can't take n > 0 elements from an empty list.  Commenting it out
allows our Eigen tests to pass.


(cherry picked from commit 8f8c2ba2fe19c6c2e47bbe2fbaf87594642e523d)
2021-11-03 23:26:34 +00:00
Xinle Liu
9c193db5c7 Fix BDCSVD's total deflation in branch 3.4, similar to that of master in MR 707.
(cherry picked from commit 4d045eba53f9a32d052eb942448ba62def066529)
2021-11-03 17:58:57 +00:00
Antonio Sanchez
6b6ba41269 Fix min/max nan-propagation for scalar "other".
Copied input type from `EIGEN_MAKE_CWISE_BINARY_OP`.

Fixes #2362.


(cherry picked from commit 03d4cbb30796ea06350414f5f551b180e4864688)
2021-10-28 17:16:49 +00:00
Rasmus Munk Larsen
96007cae8c Remove license column in tables for builtin sparse solvers since all are MPL2 now.
(cherry picked from commit 68e0d023c06e3611b7955b38bf8def66275c1c09)
2021-10-26 18:11:02 +00:00
Rasmus Munk Larsen
5d918b82a8 Add nan-propagation options to matrix and array plugins. 2021-10-21 13:48:50 -07:00
Antonio Sanchez
05c9d7ce20 Disable MSVC constant condition warning.
We use extensive use of `if (CONSTANT)`, and cannot use c++17's `if
constexpr`.

(cherry picked from commit 5bf35383e073d218be7a87bdca434be30d231e7e)
2021-10-11 10:00:29 -07:00
Antonio Sanchez
943ef50a2d Disable testing of complex compound assignment operators for MSVC.
MSVC does not support specializing compound assignments for
`std::complex`, since it already specializes them (contrary to the
standard).

Trying to use one of these on device will currently lead to a
duplicate definition error.  This is still probably preferable
to no error though.  If we remove the definitions for MSVC, then
it will compile, but the kernel will fail silently.

The only proper solution would be to define our own custom `Complex`
type.

(cherry picked from commit f0f1d7938b7083800ff75fe88e15092f08a4e67e)
2021-10-11 10:00:29 -07:00
Antonio Sanchez
7ea4adb5f0 Disable another device warning
(cherry picked from commit e9e90892fecb4bebe6473e9de491bfcd6c0de37f)
2021-10-11 10:00:29 -07:00
Antonio Sanchez
71498b32c9 Disable more NVCC warnings.
The 2979 warning is yet another "calling a __host__ function from a
__host__ device__ function.  Although we probably should eventually
address these, they are flooding the logs.  Most of these are
harmless since we only call the original from the host.
In cases where these are actually called from device, an error is generated
instead anyways.

The 2977 warning is a bit strange - although the warning suggests the
`__device__` annotation is ignored, this doesn't actually seem to be
the case.  Without the `__device__` declarations, the kernel actually
fails to run when attempting to construct such objects.  Again,
these warnings are flooding the logs, so disabling for now.

(cherry picked from commit 86c0decc480147d109b1dd8b968bcbc509b7a2e6)
2021-10-11 10:00:29 -07:00
Antonio Sanchez
ebd5c6d44b Add -mfma for AVX512DQ tests.
(cherry picked from commit 76bb29c0c2e0948ca02af686a2b5ba4be6afcccc)
2021-10-11 10:00:29 -07:00
Rasmus Munk Larsen
a8eb797a43 Remove -fabi-version=6 flag from AVX512 builds. It was added to fix builds with gcc 4.9, but these don't even work today, and the flag breaks compilation with newer versions of gcc.
(cherry picked from commit 1239adfcab1647482329a1c52396e52fca19f893)
2021-10-11 10:00:29 -07:00
Alexander Grund
929bc0e191 Fix alias violation in BFloat16
reinterpret_cast between unrelated types is undefined behavior and leads
to misoptimizations on some platforms.
Use the safer (and faster) version via bit_cast


(cherry picked from commit b5eaa4269503f77d0aa58d2f8ed9419e1ba7784d)
2021-09-20 14:25:58 +00:00
Antonio Sanchez
f046e326d9 Fix strict aliasing bug causing product_small failure.
Packet loading is skipped due to aliasing violation, leading to nullopt matrix
multiplication.

Fixes #2327.


(cherry picked from commit 3c724c44cff3f9e2e9e35351abff0b5c022b320d)
2021-09-19 18:06:17 +00:00
Ryan Pavlik
3335e0767c Fix typos in copyright dates 2021-09-15 13:26:50 -05:00
Antonio Sanchez
3395f4e604 Fix tridiagonalization_inplace_selector.
The `Options` of the new `hCoeffs` vector do not necessarily match
those of the `MatrixType`, leading to build errors. Having the
`CoeffVectorType` be a template parameter relieves this restriction.


(cherry picked from commit ebd4b17d2f5ca29a5c16ebd35d54d7aeda587820)
2021-09-08 15:47:39 +00:00
Antonio Sanchez
f03d3e7072 Missing EIGEN_DEVICE_FUNCs to get gpu_basic passing with CUDA 9.
CUDA 9 seems to require labelling defaulted constructors as
`EIGEN_DEVICE_FUNC`, despite giving warnings that such labels are
ignored.  Without these labels, the `gpu_basic` test fails to
compile, with errors about calling `__host__` functions from
`__host__ __device__` functions.


(cherry picked from commit 998bab4b04f26552b9875acfe113e69c7adccec4)
2021-09-02 03:21:43 +00:00
Maxiwell S. Garcia
b8cf1ed753 Rename 'vec_all_nan' of cxx11_tensor_expr test because this symbol is used by altivec.h
(cherry picked from commit 09fc0f97b53e22d8fef94acf0fbfeed3717ab906)
2021-09-01 17:26:59 +00:00
Rasmus Munk Larsen
9263475740 Add missing dependency on LAPACK test suite binaries to target buildtests, so make check will work correctly when EIGEN_ENABLE_LAPACK_TESTS is ON.
(cherry picked from commit 6f429a202dc01e4e88d423d65bd3aa81a7af7d64)
2021-09-01 16:41:47 +00:00
Rasmus Munk Larsen
0fdc99c65e Allow old Fortran code for LAPACK tests to compile despite argument mismatch errors (REAL passed to COMPLEX workspace argument) with GNU Fortran 10.
(cherry picked from commit 7e096ddcb09d560a846b119691e48651e74ee677)
2021-09-01 16:41:28 +00:00