4591 Commits

Author SHA1 Message Date
Martin Burchell
b26ada1e03 Fix error: unused parameter 'tmp' [-Werror,-Wunused-parameter] on clang/32-bit arm
(cherry picked from commit c54785b071e6297c062883cf43f323525ff0e6fb)
2023-07-10 14:34:09 -07:00
Antonio Sánchez
f5593b4baa Fix reshape strides when input has non-zero inner stride.
(cherry picked from commit 2260e11eb019161cc861ef2b832ce3b8a92efecd)
2023-07-10 14:34:09 -07:00
Antonio Sánchez
5547205092 Correct pnegate for floating-point zero.
(cherry picked from commit 8588d8c74b42eedde578af01605ecc90189bc329)
2023-07-10 14:34:04 -07:00
Antonio Sánchez
8cc3ec8e47 Fix realloc for non-trivial types.
(cherry picked from commit 311ba66f7c76e27489e13961d0523d0ff3185969)
2023-07-10 10:09:02 -07:00
Antonio Sánchez
fd2817e3d6 Add asserts for index-out-of-bounds in IndexedView.
(cherry picked from commit f241a2c18a77cca64a71f6f4d25c1bac9b6dbb70)
2023-07-07 15:21:18 -07:00
Matthew Sterrett
d0e2b3e58d Removed unnecessary checks for FP16C
(cherry picked from commit 39fcc89798bc54501388348a448ea0e32fa5da7d)
2023-07-07 15:21:17 -07:00
Lexi Bromfield
33a602eb37 Don't double-define Half functions on aarch64
(cherry picked from commit 66ea0c09fdd939ae2741cee1f5a9961b64d5adcd)
2023-07-07 15:21:17 -07:00
Rasmus Munk Larsen
a9490cd3c5 Fix code and unit test for a few corner cases in vectorized pow()
(cherry picked from commit 7a87ed1b6a49bd0067856dcba9ad9a3a46186220)
2023-07-07 15:21:17 -07:00
Alexander Richardson
a5469a6f0f Avoid including <sstream> with EIGEN_NO_IO
(cherry picked from commit b7668c0371054a3a938eeab32a5c10d24c1ea4fc)
2023-07-07 15:21:17 -07:00
Antonio Sánchez
6aaa45db5f Include immintrin.h header for enscripten.
(cherry picked from commit 34780d8bd13d0af0cf17a22789ef286e8512594d)
2023-07-07 15:21:17 -07:00
Antonio Sánchez
af912a7b5c Fix MSVC+CUDA issues.
(cherry picked from commit 5ed7a86ae96d411c450fb190f5a725f38f2aea9d)
2023-07-07 15:21:17 -07:00
Antonio Sánchez
8a21df2d9c Disable f16c scalar conversions for MSVC.
(cherry picked from commit 73b2c13bf2d4c8192ce1cdf7ceeb8d098cfe6b71)
2023-07-07 15:21:12 -07:00
Antonio Sánchez
973b04f3e1 Fix AVX512 builds with MSVC.
(cherry picked from commit 9a14d91a9909cc430638ac750d323df10194b84e)
2023-07-07 15:06:18 -07:00
Antonio Sánchez
16844d7529 Work around MSVC compiler bug dropping const.
(cherry picked from commit 3ca1228d451b5d156de6efe2e4514f4ec59c5ed4)
2023-07-07 15:06:18 -07:00
Arthur
fab848d4f7 Remove workarounds for bad GCC-4 warnings
(cherry picked from commit 514f90c9ffd161a17cde859fe686a70e8a6983fc)
2023-07-07 15:06:18 -07:00
Antonio Sánchez
b6d9b6f48d Remove duplicate IsRowMajor declaration.
(cherry picked from commit 0ae94456a0e6dd5e20ca65ba2f405964f6931faf)
2023-07-07 15:06:18 -07:00
Antonio Sanchez
f6954e4485 Fix enum conversion warnings in BooleanRedux.
(cherry picked from commit 55c7400db5f43c60ae8f9b475a296e897c05ddb3)
2023-07-07 11:51:10 -07:00
Yury Gitman
bd0d873b16 Fix any/all reduction in the case of row-major layout
(cherry picked from commit bf6726a0c6cb5b9400c54568308cdc094a53bfc0)
2023-07-07 11:48:49 -07:00
Antonio Sánchez
e0fe006915 Fix mixingtypes for g++-11.
(cherry picked from commit 19c39bea29e21041ceca481851b3a5c889b51d98)
2023-07-07 11:47:23 -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
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
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
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
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
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
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
Antonio Sanchez
07cc362238 Fix EIGEN_OPTIMIZATION_BARRIER for arm-clang.
Clang doesn't like !621, needs the "g" constraint back.
The "g" constraint also works for GCC >= 5.

This fixes our gitlab CI.


(cherry picked from commit 3a6296d4f198ffbcccda4303919b3b14d5e54524)
2021-09-01 16:40:08 +00:00
Antonio Sanchez
4ef67cbfb2 GCC 4.8 arm EIGEN_OPTIMIZATION_BARRIER fix (#2315).
GCC 4.8 doesn't seem to like the `g` register constraint, failing to
compile with "error: 'asm' operand requires impossible reload".

Tested `r` instead, and that seems to work, even with latest compilers.

Also fixed some minor macro issues to eliminate warnings on armv7.

Fixes #2315.


(cherry picked from commit ff07a8a63945d89301d1b29ac59d170ff9be3955)
2021-08-31 21:23:28 +00:00
Antonio Sanchez
c2b6df6e60 Disable cuda Eigen::half vectorization on host.
All cuda `__half` functions are device-only in CUDA 9, including
conversions. Host-side conversions were added in CUDA 10.
The existing code doesn't build prior to 10.0.

All arithmetic functions are always device-only, so there's
therefore no reason to use vectorization on the host at all.

Modified the code to disable vectorization for `__half` on host,
which required also updating the `TensorReductionGpu` implementation
which previously made assumptions about available packets.


(cherry picked from commit cc3573ab4451853774cd5c3497373d5fe8914774)
2021-08-31 21:23:11 +00:00
Antonio Sanchez
7aee90b8d3 Fix fix<N> when variable templates are not supported.
There were some typos that checked `EIGEN_HAS_CXX14` that should have
checked `EIGEN_HAS_CXX14_VARIABLE_TEMPLATES`, causing a mismatch
in some of the `Eigen::fix<N>` assumptions.

Also fixed the `symbolic_index` test when
`EIGEN_HAS_CXX14_VARIABLE_TEMPLATES` is 0.

Fixes #2308


(cherry picked from commit 5db9e5c77958997856ddbccfa4a52ff22e83bef9)
2021-08-30 16:23:35 +00:00
Rasmus Munk Larsen
3147391d94 Change version to 3.4.0. 2021-08-18 13:41:58 -07:00
Antonio Sanchez
115591b9e3 Workaround VS 2017 arg bug.
In VS 2017, `std::arg` for real inputs always returns 0, even for
negative inputs.  It should return `PI` for negative real values.
This seems to be fixed in VS 2019 (MSVC 1920).


(cherry picked from commit 2b410ecbefea1bf4b9d50decb946a4ebe4a73f98)
2021-08-18 19:04:50 +00:00