11629 Commits

Author SHA1 Message Date
Antonio Sanchez
ac561cd038 Reduce tensor_contract_gpu test.
The original test times out after 60 minutes on Windows, even when
setting flags to optimize for speed.  Reducing the number of
contractions performed from 3600->27 for subtests 8,9 allow the
two to run in just over a minute each.

(cherry picked from commit be9e7d205f38e3e8effdfdded88817b371673930)
2023-07-11 11:27:31 -07:00
Antonio Sanchez
554982beef Disable Tree reduction for GPU.
For moderately sized inputs, running the Tree reduction quickly
fills/overflows the GPU thread stack space, leading to memory errors.
This was happening in the `cxx11_tensor_complex_gpu` test, for example.
Disabling tree reduction on GPU fixes this.

(cherry picked from commit 24ebb37f38287d65c0e0b60c714e39faffeb5b94)
2023-07-10 16:09:30 -07:00
Antonio Sanchez
89a71f3126 Fix gpu special function tests.
Some checks used incorrect values, partly from copy-paste errors,
partly from the change in behaviour introduced in !398.

Modified results to match scipy, simplified tests by updating
`VERIFY_IS_CWISE_APPROX` to work for scalars.

(cherry picked from commit 701f5d1c91c770e558c7760da14ff3365757e275)
2023-07-10 15:57:08 -07:00
Antonio Sanchez
a605d6b996 Rename EIGEN_CUDA_FLAGS to EIGEN_CUDA_CXX_FLAGS
Also add a missing space for clang.

(cherry picked from commit 846d34384af80b80793d32257a7f917eeece41d4)
2023-07-10 15:30:41 -07:00
Antonio Sanchez
dfcd6de20a Clean up CUDA CMake files.
- Unify test/CMakeLists.txt and unsupported/test/CMakeLists.txt
- Added `EIGEN_CUDA_FLAGS` that are appended to the set of flags passed
to the cuda compiler (nvcc or clang).

The latter is to support passing custom flags (e.g. `-arch=` to nvcc,
or to disable cuda-specific warnings).

(cherry picked from commit 7b00e8b186a7679b0f46be742809a55d07d4efe8)
2023-07-10 15:30:41 -07:00
Antonio Sanchez
1ec1b16d36 Add buildtests_gpu and check_gpu to simplify GPU testing.
This is in preparation of adding GPU tests to the CI, allowing
us to limit building/testing of GPU-specific tests for a given
GPU-capable runner.

GPU tests are tagged with the label "gpu".  The new targets
```
make buildtests_gpu
make check_gpu
```
allow building and running only the gpu tests.

(cherry picked from commit 16f9a20a6f408fe8896d9c07c91e23e8159a9d2c)
2023-07-10 15:30:41 -07:00
Antonio Sánchez
0f39c851a5 Fix use of arg function in CUDA.
(cherry picked from commit 63dcb429cd91f7e1cdfaffb894bb368502ee0c38)
2023-07-10 15:30:41 -07:00
Kevin Leonardic
daa0b70a65 Fix argument for _mm256_cvtps_ph imm parameter
(cherry picked from commit d4b05454a7b33139ce6636584550780ff15af6ed)
2023-07-10 15:30:41 -07:00
Antonio Sánchez
33ba98b641 Ensure EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC is always defined on arm.
(cherry picked from commit 31cd2ad371bf8b7486951dfcd20381427aba5546)
2023-07-10 15:30:41 -07:00
Antonio Sánchez
e6e921f0e3 Disable FP16 arithmetic for arm32.
(cherry picked from commit 7465b7651edfb58322557179658853243eb96372)
2023-07-10 15:30:41 -07:00
Alexander Shaposhnikov
ebfdd6bdea Do not set EIGEN_HAS_ARM64_FP16_SCALAR_ARITHMETIC for cuda compilation
(cherry picked from commit 316eab8deb574d150f9cfc7f8b170156dc0cdd9f)
2023-07-10 15:30:41 -07:00
Alejandro Acosta
357bb11066 Replace usage of CudaStreamDevice with GpuStreamDevice in tensor benchmarks GPU
(cherry picked from commit 07e4604b1961a32bbe21841a1e97fc274b50c443)
2023-07-10 15:30:40 -07:00
Rasmus Munk Larsen
9b3d104c02 Add missing braces in Umeyama.h
(cherry picked from commit 1321821e86ebbfdf8ccda7f89b59f19feb023dbc)
2023-07-10 14:52:08 -07:00
Rasmus Munk Larsen
af3ca50f0b Work around compiler bug in Umeyama.h.
(cherry picked from commit 524c329ab23fb565eff8aa2bf36d134e97773a99)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
26b8fabd80 Return NaN in ndtri for values outside valid input range.
(cherry picked from commit 1f79a6078fb77da47069c8aec23c4e309fb982e2)
2023-07-10 14:52:08 -07:00
Charles Schlosser
385a0b38f8 JacobiSVD: set m_nonzeroSingularValues to zero if not finite
(cherry picked from commit fdc749de2ac1dd6ab25298dd60ab8d594992fd07)
2023-07-10 14:52:08 -07:00
Antonio Sanchez
a4ecfd8ead Fix boolean bitwise and warning.
(cherry picked from commit 70410310a40bf6f790e8f3c785e78aa2b8f4ca12)
2023-07-10 14:52:08 -07:00
Rasmus Munk Larsen
f296720d7d Make sure we return +/-1 above the clamping point for Erf().
(cherry picked from commit b378014fef017a829fb42c7fad15f3764bfb8ef9)
2023-07-10 14:52:08 -07:00
Rob Conde
f04d02dbf6 exclude Eigen/Core and Eigen/src/Core from being ignored due to core ignore rule
(cherry picked from commit 990a282fc40e9fb62a7aea1ba67b5c00ed838732)
2023-07-10 14:52:08 -07:00
Rohit Goswami
6f9bffe8dd DOC: Update documentation for 3.4.x
(cherry picked from commit b0eded878d5d162d61583a286c0d8a45406ad1bc)
2023-07-10 14:52:08 -07:00
Rasmus Munk Larsen
d4c24eca96 Don't crash on empty tensor contraction.
(cherry picked from commit b0f877f8e01e90a5b0f3a79d46ea234899f8b499)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
72b0759451 Fix arm builds.
(cherry picked from commit 2c8011c2dd72d6c2086b181aad8cbb6204fed5db)
2023-07-10 14:52:08 -07:00
Jonas Schulze
34d0d83278 Fix some typos
(cherry picked from commit 81cb6a51d0358151a7174481e140074401ca4afa)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
63e8b31c94 Fix parsing of command-line arguments when already specified as a cmake list.
(cherry picked from commit 555cec17edc2cae91b3310ef8915acbeb3951cab)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
99473f255b Fix failing MSVC tests due to compiler bugs.
(cherry picked from commit 394aabb0a3976d95a5c6f286d49e43bb49558cc2)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
2ce5dc428f Guard use of long double on GPU device.
(cherry picked from commit bc5cdc7a675621ce54c4a9277d041d9dd7aae757)
2023-07-10 14:52:08 -07:00
Chip Kerchner
8f1b6198c2 Fix epsilon and dummy_precision values in long double for double doubles. Prevented some algorithms from converging on PPC.
(cherry picked from commit 54459214a1b9c67df04bc529474fca1ec9f4c84f)
2023-07-10 14:52:08 -07:00
Antonio Sánchez
dae8c6d7ad Guard complex sqrt on old MSVC compilers.
(cherry picked from commit a16fb889dd5890b2a0788af10568f19155e6b262)
2023-07-10 14:52:07 -07:00
Antonio Sánchez
2dfdaa2abf More NEON packetmath fixes.
(cherry picked from commit 384269937f707669fb1ab65bee7e9bfca2c2dfa1)
2023-07-10 14:52:03 -07:00
Antonio Sánchez
a659b5dbb2 Fix NEON make_packet2f.
(cherry picked from commit 2dfbf1b251e7a32c140f36fc865b154b8a725bdd)
2023-07-10 14:34:09 -07:00
Antonio Sánchez
879854382c Fix MSVC arm build.
(cherry picked from commit 0a5392d6061134a4a32d0025fa154f830b83d606)
2023-07-10 14:34:09 -07:00
Jeremy Nimmer
90dce8dfa3 Fix undefined behavior in Block access
(cherry picked from commit a1cdcdb038cda474aefb900171222254599e9dd8)
2023-07-10 14:34:09 -07:00
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
Alexandre Hoffmann
3eb0c8b69e Changing BiCGSTAB parameters initialization so that it works with custom types
(cherry picked from commit 23524ab6fcbf557b4ae1885d25d867727330c0c2)
2023-07-10 14:34:09 -07:00
Antonio Sánchez
26adb0e5af Fix sparseLU solver when destination has a non-unit stride.
(cherry picked from commit ab2b26fbc27cd03c1d75ea8c2cce22fdd2bcc45b)
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
771e91860b Fix typo in CholmodSupport
(cherry picked from commit 7dc6db75d4e5cd89a4b708e4a022c66a27cda1bd)
2023-07-10 12:26:39 -07:00
Antonio Sánchez
4786edba26 Fix pragma check for disabling fastmath.
(cherry picked from commit c27d1abe460c32a432e1f019be17f2c0f876ccac)
2023-07-10 10:09:09 -07:00
Antonio Sánchez
15e23ab849 Explicitly state that indices must be sorted.
(cherry picked from commit bf48d463384e2fde45d0b0a008bd95351e475766)
2023-07-10 10:09:09 -07:00
Laurent Rineau
af6e7cc66a Eigen/Sparse: fix warnings -Wunused-but-set-variable
(cherry picked from commit 7846c7387c1cb09cef7329630012ea1aefe64cf9)
2023-07-10 10:09:09 -07:00
Rasmus Munk Larsen
3fbb1c1b48 Guard GCC-specific pragmas with "#ifdef EIGEN_COMP_GNUC"
(cherry picked from commit 5ceed0d57f14b0d9d62b8732f7f686b3aae56738)
2023-07-10 10:09:09 -07:00
Antonio Sánchez
28cd280726 Fix 4x4 inverse when compiling with -Ofast.
(cherry picked from commit 7d6a9925cc38842359750f3e06263e20b7635436)
2023-07-10 10:09:09 -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
Gilles Aouizerate
d641062a05 fix typo in doc/TutorialSparse.dox
(cherry picked from commit 6e83e906c21a49b44c4768c4aa590f7a21be4e96)
2023-07-07 15:21:18 -07:00
Michael Palomas
1000cf9fbc fixed msvc compilation error in GeneralizedEigenSolver.h
(cherry picked from commit 525f066671c401899ae458be6ecee473ec125f8b)
2023-07-07 15:21:18 -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
Antonio Sánchez
11dacc4802 Fix some cmake issues.
(cherry picked from commit f5364331eb4d33a6833e8ff7f2ac3bf1200bce21)
2023-07-07 15:21:18 -07:00
Antonio Sánchez
ab6f39e1e3 Fix mixingtypes tests.
(cherry picked from commit d816044b6edb666ffe5ee7107762a29153f067c0)
2023-07-07 15:21:18 -07:00
Gilles Aouizerate
6576ee4fb1 2 typos fix in the 3rd table.
(cherry picked from commit 94cc83faa1a5603a408790dfb6821cec3c9012da)
2023-07-07 15:21:18 -07:00