Commit Graph
21 Commits
Author SHA1 Message Date
Rasmus Munk Larsen 55e3ae02ac Compare summation results against forward error bound. 2021-11-04 18:04:04 -07:00
Antonio Sanchez f6c8cc0e99 Fix TensorReduction warnings and error bound for sum accuracy test.
The sum accuracy test currently uses the default test precision for
the given scalar type.  However, scalars are generated via a normal
distribution, and given a large enough count and strong enough random
generator, the expected sum is zero.  This causes the test to
periodically fail.

Here we estimate an upper-bound for the error as `sqrt(N) * prec` for
summing N values, with each having an approximate epsilon of `prec`.

Also fixed a few warnings generated by MSVC when compiling the
reduction test.
2021-10-30 14:59:00 -07:00
Rasmus Munk Larsen 360290fc42 Improve accuracy of full tensor reduction for half and bfloat16 by reducing leaf size in tree reduction.
Add more unit tests for summation accuracy.
2021-10-20 19:54:06 +00:00
Rasmus Munk Larsen ac2eca6b11 Update tensor reduction test to avoid undefined division of bfloat16 by int. 2020-07-22 00:35:51 +00:00
Teng Lu 386d809bde Support BFloat16 in Eigen 2020-06-20 19:16:24 +00:00
Eugene Zhulenev 8a977c1f46 Fix cxx11_tensor_{block_access, reduction} tests 2018-10-25 11:31:29 -07:00
Christoph Hertzberg c5f1d0a72a Fix shadow warning 2018-10-02 19:01:08 +02:00
Rasmus Munk Larsen 46f88fc454 Use numerically stable tree reduction in TensorReduction. 2018-09-11 10:08:10 -07:00
Gael Guennebaud 7ccb623746 bug #1569: fix Tensor<half>::mean() on AVX with respective unit test. 2018-07-19 13:15:40 +02:00
Gael Guennebaud 82f0ce2726 Get rid of EIGEN_TEST_FUNC, unit tests must now be declared with EIGEN_DECLARE_TEST(mytest) { /* code */ }.
This provide several advantages:
- more flexibility in designing unit tests
- unit tests can be glued to speed up compilation
- unit tests are compiled with same predefined macros, which is a requirement for zapcc
2018-07-17 14:46:15 +02:00
Benoit Steiner c6b0de2c21 Improved partial reductions in more cases 2016-07-22 17:18:20 -07:00
Gael Guennebaud ccaace03c9 Make EIGEN_HAS_CONSTEXPR user configurable 2016-05-20 15:10:08 +02:00
Benoit Steiner 4416a5dcff Added missing include 2016-03-04 14:35:43 -08:00
Benoit Steiner 0d15ad8019 Updated the regressions tests that cover full reductions 2015-11-05 14:22:30 -08:00
Benoit Steiner eaf4b98180 Added support for boolean reductions (ie 'and' & 'or' reductions) 2015-10-20 11:41:22 -07:00
Gael Guennebaud 38874b1651 Fix shadow warnings in Tensor module 2015-06-16 14:43:46 +02:00
Benoit Steiner dcb2a8b184 Added the EIGEN_HAS_CONSTEXPR define
Gate the tensor index list code based on the value of EIGEN_HAS_CONSTEXPR
2015-02-06 02:51:59 -08:00
Benoit Steiner 5a6ea4edf6 Added more tests to cover tensor reductions 2015-01-28 10:02:47 -08:00
Benoit Steiner b5124e7cfd Created many additional tests 2015-01-14 15:46:04 -08:00
Benoit Steiner 767424af18 Improved the functors defined for standard reductions
Added a functor to encapsulate the generation of random numbers on cpu and gpu.
2014-10-09 15:36:23 -07:00
Benoit Steiner 7caaf6453b Added support for tensor reductions and concatenations 2014-10-01 20:38:22 -07:00