Commit Graph

22 Commits

Author SHA1 Message Date
Antonio Sanchez
a7d2552af8 Remove HasCast and fix packetmath cast tests.
The use of the `packet_traits<>::HasCast` field is currently inconsistent with
`type_casting_traits<>`, and is unused apart from within
`test/packetmath.cpp`. In addition, those packetmath cast tests do not
currently reflect how casts are performed in practice: they ignore the
`SrcCoeffRatio` and `TgtCoeffRatio` fields, assuming a 1:1 ratio.

Here we remove the unsed `HasCast`, and modify the packet cast tests to
better reflect their usage.
2020-06-11 17:26:56 +00:00
Antonio Sánchez
8719b9c5bc Disable test for 32-bit systems (e.g. ARM, i386)
Both i386 and 32-bit ARM do not define __uint128_t. On most systems, if
__uint128_t is defined, then so is the macro __SIZEOF_INT128__.

https://stackoverflow.com/questions/18531782/how-to-know-if-uint128-t-is-defined1
2020-05-28 17:40:15 +00:00
Rasmus Munk Larsen
ab773c7e91 Extend support for Packet16b:
* Add ptranspose<*,4> to support matmul and add unit test for Matrix<bool> * Matrix<bool>
* work around a bug in slicing of Tensor<bool>.
* Add tensor tests

This speeds up matmul for boolean matrices by about 10x

name                            old time/op             new time/op             delta
BM_MatMul<bool>/8                267ns ± 0%              479ns ± 0%  +79.25%          (p=0.008 n=5+5)
BM_MatMul<bool>/32              6.42µs ± 0%             0.87µs ± 0%  -86.50%          (p=0.008 n=5+5)
BM_MatMul<bool>/64              43.3µs ± 0%              5.9µs ± 0%  -86.42%          (p=0.008 n=5+5)
BM_MatMul<bool>/128              315µs ± 0%               44µs ± 0%  -85.98%          (p=0.008 n=5+5)
BM_MatMul<bool>/256             2.41ms ± 0%             0.34ms ± 0%  -85.68%          (p=0.008 n=5+5)
BM_MatMul<bool>/512             18.8ms ± 0%              2.7ms ± 0%  -85.53%          (p=0.008 n=5+5)
BM_MatMul<bool>/1k               149ms ± 0%               22ms ± 0%  -85.40%          (p=0.008 n=5+5)
2020-04-28 16:12:47 +00:00
Mehdi Goli
7d08fa805a [SYCL] This PR adds the minimum modifications to the Eigen unsupported module required to run it on devices supporting SYCL.
* Abstracting the pointer type so that both SYCL memory and pointer can be captured.
* Converting SYCL virtual pointer to SYCL device memory in Eigen evaluator class.
* Binding SYCL placeholder accessor to command group handler by using bind method in Eigen evaluator node.
* Adding SYCL macro for controlling loop unrolling.
* Modifying the TensorDeviceSycl.h and SYCL executor method to adopt the above changes.
2019-06-28 10:08:23 +01:00
Eugene Zhulenev
1b8d70a22b Support reshaping with static shapes and dimensions conversion in tensor broadcasting 2018-09-14 15:25:27 -07: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
Gael Guennebaud
131ee4bb8e Split test_slice_in_expr which seems to be huge for visual 2016-07-11 11:46:55 +02:00
Gael Guennebaud
69378eed0b Split huge unit test 2016-07-07 15:18:04 +02:00
Gael Guennebaud
f5e780fb05 split huge unit test 2016-07-07 08:59:59 +02:00
Benoit Steiner
c3cada38e2 Speedup a test 2016-06-01 21:13:00 -07:00
Benoit Steiner
abc815798b Added a new operation to enable more powerful tensorindexing. 2016-05-27 12:22:25 -07:00
Benoit Steiner
31afdcb4c2 Fix return type for TensorEvaluator<TensorSlicingOp>::data 2015-09-17 09:40:21 -07:00
Benoit Steiner
bb483313f6 Fixed another batch of compilation warnings 2015-02-28 02:32:46 -08:00
Benoit Steiner
61409d9449 Silenced one more comilation warning 2015-02-28 01:49:09 -08:00
Benoit Steiner
410070e5ab Added more tests to validate support for tensors laid out in RowMajor order. 2015-02-25 16:14:59 -08:00
Benoit Steiner
14f537c296 gcc doesn't consider that
template<typename OtherDerived> TensorStridingOp& operator = (const OtherDerived& other)
provides a valid assignment operator for the striding operation, and therefore refuses to compile code like:
result.stride(foo) = source.stride(bar);

Added the explicit
   TensorStridingOp& operator = (const TensorStridingOp& other)

as a workaround to get the code to compile, and did the same in all the operations that can be used as lvalues.
2015-01-16 09:09:23 -08:00
Benoit Steiner
b5124e7cfd Created many additional tests 2015-01-14 15:46:04 -08:00
Benoit Steiner
f786897e4b Added access to the unerlying raw data of a tnsor slice/chip whenever possible 2014-10-17 15:33:27 -07:00
Benoit Steiner
99d75235a9 Misc improvements and cleanups 2014-10-13 17:02:09 -07:00
Benoit Steiner
36fffe48f7 Misc api improvements and cleanups 2014-08-23 14:35:41 -07:00
Benoit Steiner
9b7a6f0122 Added tests for tensor slicing 2014-07-10 11:27:27 -07:00
Benoit Steiner
774c3c1e0a Created additional unit tests for the tensor code and improved existing ones. 2014-06-13 10:20:28 -07:00