aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src
Commit message (Collapse)AuthorAge
* Remove rogue include in TypeCasting.h. Meta.h is already included by the ↵Gravatar Rasmus Munk Larsen2020-01-14
| | | | top-level header in Eigen/Core.
* Switching unpacket_traits<Packet4i> to vectorizable=true.Gravatar Everton Constantino2020-01-13
|
* Adding correct cache sizes for PPC architecture.Gravatar Everton Constantino2020-01-13
|
* call Explicitly ::rint and ::rintf for targets without c++11. Without this, ↵Gravatar Rasmus Munk Larsen2020-01-10
| | | | the Windows build breaks when trying to compile numext::rint<double>.
* Improvements to the tidiness and completeness of the NEON implementationGravatar Joel Holdsworth2020-01-10
|
* Fix for gcc build error when using Eigen headers with AVX512Gravatar Anuj Rawat2020-01-10
|
* Adding RInt vector support for SYCL.Gravatar mehdi-goli2020-01-10
|
* Don't add EIGEN_DEVICE_FUNC to random() since ::rand is not available in Cuda.Gravatar Rasmus Munk Larsen2020-01-09
|
* Add missing EIGEN_DEVICE_FUNC annotations in MathFunctions.h.Gravatar Rasmus Munk Larsen2020-01-09
|
* Don't use the rational approximation to the logistic function on GPUs as it ↵Gravatar Rasmus Munk Larsen2020-01-09
| | | | appears to be slightly slower.
* The upper limits for where to use the rational approximation to the logistic ↵Gravatar Rasmus Munk Larsen2020-01-08
| | | | function were not set carefully enough in the original commit, and some arguments would cause the function to return values greater than 1. This change set the versions found by scanning all floating point numbers (using std::nextafterf()).
* Bug #1785: Introduce numext::rint.Gravatar Ilya Tokar2020-01-07
| | | | | | This provides a new op that matches std::rint and previous behavior of pround. Also adds corresponding unsupported/../Tensor op. Performance is the same as e. g. floor (tested SSE/AVX).
* [SYCL Backend]Gravatar mehdi-goli2020-01-07
| | | | | | | * Adding Missing operations for vector comparison in SYCL. This caused compiler error for vector comparison when compiling SYCL * Fixing the compiler error for placement new in TensorForcedEval.h This caused compiler error when compiling SYCL backend * Reducing the SYCL warning by removing the abort function inside the kernel * Adding Strong inline to functions inside SYCL interop.
* Fix -Werror -Wfloat-conversion warning.Gravatar Janek Kozicki2019-12-23
|
* Bug #1788: Fix rule-of-three violations inside the stable modules.Gravatar Christoph Hertzberg2019-12-19
| | | | | This fixes deprecated-copy warnings when compiling with GCC>=9 Also protect some additional Base-constructors from getting called by user code code (#1587)
* Fix some maybe-unitialized warningsGravatar Christoph Hertzberg2019-12-18
|
* Add default definition for EIGEN_PREDICT_*Gravatar Rasmus Munk Larsen2019-12-16
|
* Improve accuracy of fast approximate tanh and the logistic functions in ↵Gravatar Rasmus Munk Larsen2019-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eigen, such that they preserve relative accuracy to within a few ULPs where their function values tend to zero (around x=0 for tanh, and for large negative x for the logistic function). This change re-instates the fast rational approximation of the logistic function for float32 in Eigen (removed in https://gitlab.com/libeigen/eigen/commit/66f07efeaed39d6a67005343d7e0caf7d9eeacdb), but uses the more accurate approximation 1/(1+exp(-1)) ~= exp(x) below -9. The exponential is only calculated on the vectorized path if at least one element in the SIMD input vector is less than -9. This change also contains a few improvements to speed up the original float specialization of logistic: - Introduce EIGEN_PREDICT_{FALSE,TRUE} for __builtin_predict and use it to predict that the logistic-only path is most likely (~2-3% speedup for the common case). - Carefully set the upper clipping point to the smallest x where the approximation evaluates to exactly 1. This saves the explicit clamping of the output (~7% speedup). The increased accuracy for tanh comes at a cost of 10-20% depending on instruction set. The benchmarks below repeated calls u = v.logistic() (u = v.tanh(), respectively) where u and v are of type Eigen::ArrayXf, have length 8k, and v contains random numbers in [-1,1]. Benchmark numbers for logistic: Before: Benchmark Time(ns) CPU(ns) Iterations ----------------------------------------------------------------- SSE BM_eigen_logistic_float 4467 4468 155835 model_time: 4827 AVX BM_eigen_logistic_float 2347 2347 299135 model_time: 2926 AVX+FMA BM_eigen_logistic_float 1467 1467 476143 model_time: 2926 AVX512 BM_eigen_logistic_float 805 805 858696 model_time: 1463 After: Benchmark Time(ns) CPU(ns) Iterations ----------------------------------------------------------------- SSE BM_eigen_logistic_float 2589 2590 270264 model_time: 4827 AVX BM_eigen_logistic_float 1428 1428 489265 model_time: 2926 AVX+FMA BM_eigen_logistic_float 1059 1059 662255 model_time: 2926 AVX512 BM_eigen_logistic_float 673 673 1000000 model_time: 1463 Benchmark numbers for tanh: Before: Benchmark Time(ns) CPU(ns) Iterations ----------------------------------------------------------------- SSE BM_eigen_tanh_float 2391 2391 292624 model_time: 4242 AVX BM_eigen_tanh_float 1256 1256 554662 model_time: 2633 AVX+FMA BM_eigen_tanh_float 823 823 866267 model_time: 1609 AVX512 BM_eigen_tanh_float 443 443 1578999 model_time: 805 After: Benchmark Time(ns) CPU(ns) Iterations ----------------------------------------------------------------- SSE BM_eigen_tanh_float 2588 2588 273531 model_time: 4242 AVX BM_eigen_tanh_float 1536 1536 452321 model_time: 2633 AVX+FMA BM_eigen_tanh_float 1007 1007 694681 model_time: 1609 AVX512 BM_eigen_tanh_float 471 471 1472178 model_time: 805
* Resolve double-promotion warnings when compiling with clang.Gravatar Christoph Hertzberg2019-12-13
| | | | `sin` was calling `sin(double)` instead of `std::sin(float)`
* Bug 1785: fix pround on x86 to use the same rounding mode as std::round.Gravatar Ilya Tokar2019-12-12
| | | | | | This also adds pset1frombits helper to Packet[24]d. Makes round ~45% slower for SSE: 1.65µs ± 1% before vs 2.45µs ± 2% after, stil an order of magnitude faster than scalar version: 33.8µs ± 2%.
* Clamp tanh approximation outside [-c, c] where c is the smallest value where ↵Gravatar Rasmus Munk Larsen2019-12-12
| | | | the approximation is exactly +/-1. Without FMA, c = 7.90531110763549805, with FMA c = 7.99881172180175781.
* Fix implementation of complex expm1. Add tests that fail with previous ↵Gravatar Srinivas Vasudevan2019-12-12
| | | | implementation, but pass with the current one.
* IO: Fixed printing of char and unsigned char matricesGravatar Joel Holdsworth2019-12-11
|
* Added Eigen::numext typedefs for uint8_t, int8_t, uint16_t and int16_tGravatar Joel Holdsworth2019-12-11
|
* Bug 1786: fix compilation with MSVCGravatar Gael Guennebaud2019-12-11
|
* Fix for HIP breakage detected on 191210Gravatar Deven Desai2019-12-10
| | | | | | | | The following commit introduces compile errors when running eigen with hipcc https://gitlab.com/libeigen/eigen/commit/2918f85ba976dbfbf72f7d4c1961a577f5850148 hipcc errors out because it requies the device attribute on the methods within the TensorBlockV2ResourceRequirements struct instroduced by the commit above. The fix is to add the device attribute to those methods
* Update old links to bitbucket to point to gitlab.comGravatar Gael Guennebaud2019-12-04
|
* Merged in ↵Gravatar Rasmus Larsen2019-12-04
|\ | | | | | | | | | | | | | | anshuljl/eigen-2/Anshul-Jaiswal/update-configurevectorizationh-to-not-op-1573079916090 (pull request PR-754) Update ConfigureVectorization.h to not optimize fp16 routines when compiling with cuda. Approved-by: Deven Desai <deven.desai.amd@gmail.com>
* | Fix QuaternionBase::cast for quaternion map and wrapper.Gravatar Gael Guennebaud2019-12-03
| |
* | bug #1776: fix vector-wise STL iterator's operator-> using a proxy as ↵Gravatar Gael Guennebaud2019-12-03
| | | | | | | | | | | | pointer type. This changeset fixes also the value_type definition.
* | Revert the specialization for scalar_logistic_op<float> introduced in:Gravatar Rasmus Munk Larsen2019-12-02
| | | | | | | | | | | | | | https://bitbucket.org/eigen/eigen/commits/77b447c24e3344e43ff64eb932d4bb35a2db01ce While providing a 50% speedup on Haswell+ processors, the large relative error outside [-18, 18] in this approximation causes problems, e.g., when computing gradients of activation functions like softplus in neural networks.
* | Merged in ezhulenev/eigen-02 (pull request PR-767)Gravatar Rasmus Larsen2019-12-02
|\ \ | | | | | | | | | Fix shadow warnings in AlignedBox and SparseBlock
* | | Fix for the HIP build+test errors.Gravatar Deven Desai2019-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes have introduced the following build error when compiling with HIPCC --------- unsupported/test/../../Eigen/src/Core/GenericPacketMath.h:254:58: error: 'ldexp': no overloaded function has restriction specifiers that are compatible with the ambient context 'pldexp' --------- The fix for the error is to pick the math function(s) from the global namespace (where they are declared as device functions in the HIP header files) when compiling with HIPCC.
* | | [SYCL] Rebasing the SYCL support branch on top of the Einge upstream master ↵Gravatar Mehdi Goli2019-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | branch. * Unifying all loadLocalTile from lhs and rhs to an extract_block function. * Adding get_tensor operation which was missing in TensorContractionMapper. * Adding the -D method missing from cmake for Disable_Skinny Contraction operation. * Wrapping all the indices in TensorScanSycl into Scan parameter struct. * Fixing typo in Device SYCL * Unifying load to private register for tall/skinny no shared * Unifying load to vector tile for tensor-vector/vector-tensor operation * Removing all the LHS/RHS class for extracting data from global * Removing Outputfunction from TensorContractionSkinnyNoshared. * Combining the local memory version of tall/skinny and normal tensor contraction into one kernel. * Combining the no-local memory version of tall/skinny and normal tensor contraction into one kernel. * Combining General Tensor-Vector and VectorTensor contraction into one kernel. * Making double buffering optional for Tensor contraction when local memory is version is used. * Modifying benchmark to accept custom Reduction Sizes * Disabling AVX optimization for SYCL backend on the host to allow SSE optimization to the host * Adding Test for SYCL * Modifying SYCL CMake
| * | Fix shadow warnings in AlignedBox and SparseBlockGravatar Eugene Zhulenev2019-11-27
|/ /
* | Add missing EIGEN_DEVICE_FUNC attribute to template specializations for pexp ↵Gravatar Rasmus Munk Larsen2019-11-27
| | | | | | | | to fix GPU build.
* | Fix warning due to missing cast for exponent arguments for std::frexp and ↵Gravatar Rasmus Munk Larsen2019-11-26
| | | | | | | | std::lexp.
* | SparseRef: Fixed alignment warning on ARM GCCGravatar Joel Holdsworth2019-11-07
| |
| * Update ConfigureVectorization.h to not optimize fp16 routines when compiling ↵Gravatar Anshul Jaiswal2019-11-06
| | | | | | | | with cuda.
* | Fix duplicate symbol linking error.Gravatar Gael Guennebaud2019-11-20
| |
* | 1. Fix a bug in psqrt and make it return 0 for +inf arguments.Gravatar Rasmus Munk Larsen2019-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2. Simplify handling of special cases by taking advantage of the fact that the builtin vrsqrt approximation handles negative, zero and +inf arguments correctly. This speeds up the SSE and AVX implementations by ~20%. 3. Make the Newton-Raphson formula used for rsqrt more numerically robust: Before: y = y * (1.5 - x/2 * y^2) After: y = y * (1.5 - y * (x/2) * y) Forming y^2 can overflow for very large or very small (denormalized) values of x, while x*y ~= 1. For AVX512, this makes it possible to compute accurate results for denormal inputs down to ~1e-42 in single precision. 4. Add a faster double precision implementation for Knights Landing using the vrsqrt28 instruction and a single Newton-Raphson iteration. Benchmark results: https://bitbucket.org/snippets/rmlarsen/5LBq9o
* | bug #1744: fix compilation with MSVC 2017 and AVX512, plog1p/pexpm1 require ↵Gravatar Gael Guennebaud2019-11-15
| | | | | | | | plog/pexp, but the later was disabled on some compilers
* | bug #1774: fix VectorwiseOp::begin()/end() return types regarding constness.Gravatar Gael Guennebaud2019-11-14
| |
* | PR 751: Fixed compilation issue when compiling using MSVC with /arch:AVX512 flagGravatar Sakshi Goynar2019-10-31
| |
* | Enable CompleteOrthogonalDecomposition::pseudoInverse with non-square ↵Gravatar Gael Guennebaud2019-11-13
| | | | | | | | fixed-size matrices.
* | Disable AVX on broken xcode versions. See PR 748.Gravatar Gael Guennebaud2019-11-12
|/ | | | Patch adapted from Hans Johnson's PR 748.
* Add EIGEN_HAS_INTRINSIC_INT128 macroGravatar Rasmus Munk Larsen2019-11-06
| | | | Add a new EIGEN_HAS_INTRINSIC_INT128 macro, and use this instead of __SIZEOF_INT128__. This fixes related issues with TensorIntDiv.h when building with Clang for Windows, where support for 128-bit integer arithmetic is advertised but broken in practice.
* Rollback or PR-746 and partial rollback of ↵Gravatar Rasmus Munk Larsen2019-11-05
| | | | | | | | https://bitbucket.org/eigen/eigen/commits/668ab3fc474e54c7919eda4fbaf11f3a99246494 . std::array is still not supported in CUDA device code on Windows.
* Remove internal::smart_copy and replace with std::copyGravatar Eugene Zhulenev2019-10-29
|
* bug #1752: make is_convertible equivalent to the std c++11 equivalent and ↵Gravatar Gael Guennebaud2019-10-10
| | | | fallback to std::is_convertible when c++11 is enabled.