Rasmus Munk Larsen
2b07018140
Enable vectorized version on GPUs. The underlying bug has been fixed.
2018-09-13 16:12:22 -07:00
Rasmus Munk Larsen
53568e3549
Merged in ezhulenev/eigen/tiled_evalution_support (pull request PR-444)
...
Tiled evaluation for Tensor ops
Approved-by: Rasmus Munk Larsen <rmlarsen@google.com>
Approved-by: Gael Guennebaud <g.gael@free.fr>
2018-09-13 22:05:47 +00:00
Eugene Zhulenev
01197e4452
Fix warnings
2018-09-13 15:03:36 -07:00
Gael Guennebaud
7f3b17e403
MSVC 2015 supports c++11 thread-local-storage
2018-09-13 18:15:07 +02:00
Rasmus Munk Larsen
e289f44c56
Don't vectorize the MeanReducer unless pdiv is available.
2018-09-11 14:09:00 -07:00
Eugene Zhulenev
55bb7e7935
Merge with upstream eigen/default
2018-09-11 13:33:06 -07:00
Eugene Zhulenev
81b38a155a
Fix compilation of tiled evaluation code with c++03
2018-09-11 13:32:32 -07:00
Rasmus Munk Larsen
46f88fc454
Use numerically stable tree reduction in TensorReduction.
2018-09-11 10:08:10 -07:00
Deven Desai
c64fe9ea1f
Updates to fix HIP-clang specific compile errors.
...
Compiling the eigen unittests with hip-clang (HIP with clang as the underlying compiler instead of hcc or nvcc), results in compile errors. The changes in this commit fix those compile errors. The main change is to convert a few instances of "__device__" to "EIGEN_DEVICE_FUNC"
2018-08-30 20:22:16 +00:00
Rasmus Munk Larsen
8b3d9ed081
Use padding instead of alignment attribute, which MaxSizeVector does not respect. This leads to undefined behavior and hard-to-trace bugs.
2018-09-05 11:20:06 -07:00
Eugene Zhulenev
c144bb355b
Merge with upstream eigen/default
2018-08-27 14:34:07 -07:00
Christoph Hertzberg
b1653d1599
Fix some trivial C++11 vs C++03 compatibility warnings
2018-08-25 12:21:00 +02:00
Christoph Hertzberg
5aaedbeced
Fixed more sign-compare and type-limits warnings
2018-08-24 23:54:12 +02:00
Christoph Hertzberg
f7675b826b
Fix several integer conversion and sign-compare warnings
2018-08-24 22:58:55 +02:00
Rasmus Munk Larsen
744e2fe0de
Address comments about EIGEN_THREAD_LOCAL.
2018-08-24 10:24:54 -07:00
Rasmus Munk Larsen
8d9bc5cc02
Fix g++ compilation.
2018-08-23 13:06:39 -07:00
Rasmus Munk Larsen
e9f9d70611
Don't rely on __had_feature for g++.
...
Don't use __thread.
Only use thread_local for gcc 4.8 or newer.
2018-08-23 12:59:46 -07:00
Rasmus Munk Larsen
668690978f
Pad PerThread when we emulate thread_local to prevent false sharing.
2018-08-23 12:54:33 -07:00
Rasmus Munk Larsen
6cedc5a9b3
rename mu.
2018-08-23 12:11:58 -07:00
Rasmus Munk Larsen
6e0464004a
Store std::unique_ptr instead of raw pointers in per_thread_map_.
2018-08-23 12:10:08 -07:00
Rasmus Munk Larsen
e51d9e473a
Protect #undef max with #ifdef max.
2018-08-23 11:42:05 -07:00
Rasmus Munk Larsen
d35880ed91
merge
2018-08-23 11:36:49 -07:00
Christoph Hertzberg
a709c8efb4
Replace pointers by values or unique_ptr for better leak-safety
2018-08-23 19:41:59 +02:00
Christoph Hertzberg
39335cf51e
Make MaxSizeVector leak-safe
2018-08-23 19:37:56 +02:00
Benoit Steiner
19df4d5752
Merged in codeplaysoftware/eigen-upstream-pure/Pointer_type_creation (pull request PR-461)
...
Creating a pointer type in TensorCustomOp.h
2018-08-16 18:28:33 +00:00
Benoit Steiner
f641cf1253
Adding missing at method in Eigen::array
2018-08-16 11:24:37 -07:00
Benoit Steiner
e23c8c294e
Use actual types instead of the auto keyword to make the code more portable
2018-08-16 10:41:01 -07:00
Mehdi Goli
80f1a76dec
removing the noises.
2018-08-16 13:33:24 +01:00
Mehdi Goli
d0b01ebbf6
Reverting the unitended delete from the code.
2018-08-16 13:21:36 +01:00
Mehdi Goli
161dcbae9b
Using PointerType struct and specializing it per device for TensorCustomOp.h
2018-08-16 00:07:02 +01:00
Sameer Agarwal
f197c3f55b
Removed an used variable (PacketSize) from TensorExecutor
2018-08-15 11:24:57 -07:00
Benoit Steiner
4181556907
Fixed the tensor contraction code.
2018-08-15 09:34:47 -07:00
Benoit Steiner
fbb834144d
Fixed more compilation errors
2018-08-15 08:52:58 -07:00
Benoit Steiner
ab3f481141
Cleaned up the code and make it compile with more compilers
2018-08-14 14:05:46 -07:00
Rasmus Munk Larsen
fa0bcbf230
merge
2018-08-14 12:18:31 -07:00
Rasmus Munk Larsen
15d4f515e2
Use plain_assert in destructors to avoid throwing in CXX11 tests where main.h owerwrites eigen_assert with a throwing version.
2018-08-14 12:17:46 -07:00
Rasmus Munk Larsen
2a98bd9c8e
Merged eigen/eigen into default
2018-08-14 12:02:09 -07:00
Benoit Steiner
59bba77ead
Fixed compilation errors with gcc 4.7 and 4.8
2018-08-14 10:54:48 -07:00
Mehdi Goli
8ba799805b
Merge with upstream
2018-08-14 09:43:45 +01:00
Rasmus Munk Larsen
6d6e7b7027
merge
2018-08-13 15:34:50 -07:00
Rasmus Munk Larsen
9bb75d8d31
Add Barrier.h.
2018-08-13 15:34:03 -07:00
Rasmus Munk Larsen
2e1adc0324
Merged eigen/eigen into default
2018-08-13 15:32:00 -07:00
Rasmus Munk Larsen
8278ae6313
Add support for thread local support on platforms that do not support it through emulation using a hash map.
2018-08-13 15:31:23 -07:00
Benoit Steiner
501be70b27
Code cleanup
2018-08-13 15:16:40 -07:00
Gael Guennebaud
3ec60215df
Merged in rmlarsen/eigen2 (pull request PR-466)
...
Move sigmoid functor to core and rename it to 'logistic'.
2018-08-13 21:28:20 +00:00
Rasmus Munk Larsen
0f1b2e08a5
Call logistic functor from Tensor::sigmoid.
2018-08-13 11:52:58 -07:00
Benoit Steiner
26239ee580
Use NULL instead of nullptr to avoid adding a cxx11 requirement.
2018-08-13 11:05:51 -07:00
Benoit Steiner
3810ec228f
Don't use the auto keyword since it's not always supported properly.
2018-08-13 10:46:09 -07:00
Benoit Steiner
e6d5be811d
Fixed syntax of nested templates chevrons to make it compatible with c++97 mode.
2018-08-13 10:29:21 -07:00
Mehdi Goli
1aa86aad14
Merge with upstream.
2018-08-13 15:40:31 +01:00
Eugene Zhulenev
35d90e8960
Fix BlockAccess enum in CwiseUnaryOp evaluator
2018-08-10 17:37:58 -07:00
Eugene Zhulenev
855b68896b
Merge with eigen/default
2018-08-10 17:18:42 -07:00
Eugene Zhulenev
f2209d06e4
Add block evaluationto CwiseUnaryOp and add PreferBlockAccess enum to all evaluators
2018-08-10 16:53:36 -07:00
Benoit Steiner
c8ea398675
Avoided language features that are only available in cxx11 mode.
2018-08-10 13:02:41 -07:00
Benoit Steiner
4be4286224
Made the code compile with gcc 5.4.
2018-08-10 11:32:58 -07:00
Eugene Zhulenev
cfaedb38cd
Fix bug in a test + compilation errors
2018-08-09 09:44:07 -07:00
Mehdi Goli
ea8fa5e86f
Merge with upstream
2018-08-09 14:07:56 +01:00
Mehdi Goli
8c083bfd0e
Properly fixing the PointerType for TensorCustomOp.h. As the output type here should be based on CoeffreturnType not the Scalar type. Therefore, Similar to reduction and evalTo function, it should have its own MakePointer class. In this case, for other device the type is defaulted to CoeffReturnType and no changes is required on users' code. However, in SYCL, on the device, we can recunstruct the device Type.
2018-08-09 13:57:43 +01:00
Eugene Zhulenev
1c8b9e10a7
Merged with upstream eigen
2018-08-08 16:57:58 -07:00
Benoit Steiner
131ed1191f
Merged in codeplaysoftware/eigen-upstream-pure/Fixing_compiler_warning (pull request PR-462)
...
Fixing compiler warning in TensorBlock.h as it was creating a lot of noise at compilation.
2018-08-08 18:14:15 +00:00
Mehdi Goli
532a0be05c
Fixing compiler warning in TensorBlock.h as it was creating a lot of noise at compilation.
2018-08-08 12:12:26 +01:00
Mehdi Goli
3055e3a7c2
Creating a pointer type in TensorCustomOp.h
2018-08-08 11:19:02 +01:00
Rasmus Munk Larsen
693fb1d41e
Fix init order.
2018-08-07 17:18:51 -07:00
Benoit Steiner
10d286f55b
Silenced a couple of compilation warnings.
2018-08-06 16:00:29 -07:00
Benoit Steiner
d011d05fd6
Fixed compilation errors.
2018-08-06 13:40:51 -07:00
Rasmus Munk Larsen
36e7e7dd8f
Forward declare NoOpOutputKernel as struct rather than class to be consistent with implementation.
2018-08-06 13:16:32 -07:00
Rasmus Munk Larsen
fa68342ef8
Move sigmoid functor to core.
2018-08-03 17:31:23 -07:00
Christoph Hertzberg
023ed6b9a8
Product of empty array must be 1 and not 0.
2018-08-30 17:14:52 +02:00
Christoph Hertzberg
c2f4e8c08e
Fix integer conversion warning
2018-08-30 17:12:53 +02:00
Deven Desai
946c3e2544
adding EIGEN_DEVICE_FUNC attribute to fix some GPU unit tests that are broken in HIP mode
2018-08-27 23:04:08 +00:00
Christoph Hertzberg
73ca600bca
Fix numerous shadow-warnings for GCC<=4.8
2018-08-28 18:32:39 +02:00
Eugene Zhulenev
1b0373ae10
Replace all using declarations with typedefs in Tensor ops
2018-08-01 15:55:46 -07:00
Rasmus Munk Larsen
bcb29f890c
Fix initialization order.
2018-08-03 10:18:53 -07:00
Mehdi Goli
3074b1ff9e
Fixing the compilation error.
2018-08-03 17:13:44 +01:00
Mehdi Goli
01358300d5
Creating separate SYCL required PR for uncontroversial files.
2018-08-03 16:59:15 +01:00
Eugene Zhulenev
64abdf1d7e
Fix typo + get rid of redundant member variables for block sizes
2018-08-01 12:35:19 -07:00
Benoit Steiner
93b9e36e10
Merged in paultucker/eigen (pull request PR-431)
...
Optional ThreadPoolDevice allocator
Approved-by: Benoit Steiner <benoit.steiner.goog@gmail.com>
2018-08-01 19:14:34 +00:00
Eugene Zhulenev
385b3ff12f
Merged latest changes from upstream/eigen
2018-08-01 11:59:04 -07:00
Benoit Steiner
17221115c9
Merged in codeplaysoftware/eigen-upstream-pure/eigen_variadic_assert (pull request PR-447)
...
Adding variadic version of assert which can take a parameter pack as its input.
2018-08-01 16:41:54 +00:00
Benoit Steiner
0360c36170
Merged in codeplaysoftware/eigen-upstream-pure/separating_internal_memory_allocation (pull request PR-446)
...
Distinguishing between internal memory allocation/deallocation from explicit user memory allocation/deallocation.
2018-08-01 16:13:15 +00:00
Mehdi Goli
c6a5c70712
Correcting the position of allocate_temp/deallocate_temp in TensorDeviceGpu.h
2018-08-01 16:56:26 +01:00
Benoit Steiner
45f75f1ace
Merged in codeplaysoftware/eigen-upstream-pure/using_PacketType_class (pull request PR-449)
...
Enabling per device specialisation of packetSize.
2018-08-01 15:43:03 +00:00
Mehdi Goli
af96018b49
Using the suggested modification.
2018-08-01 16:04:44 +01:00
Mehdi Goli
b512a9536f
Enabling per device specialisation of packetsize.
2018-08-01 13:39:13 +01:00
Mehdi Goli
3a197a60e6
variadic version of assert which can take a parameter pack as its input.
2018-08-01 12:19:14 +01:00
Mehdi Goli
d7a8414848
Distinguishing between internal memory allocation/deallocation from explicit user memory allocation/deallocation.
2018-08-01 11:56:30 +01:00
Mehdi Goli
9e219bb3d3
Converting ad-hoc inline keyword to EIGEN_STRONG_INLINE MACRO.
2018-08-01 10:47:49 +01:00
Eugene Zhulenev
83c0a16baf
Add block evaluation support to TensorOps
2018-07-31 15:56:31 -07:00
Benoit Steiner
edf46bd7a2
Merged in yuefengz/eigen (pull request PR-370)
...
Use device's allocate function instead of internal::aligned_malloc.
2018-07-31 22:38:28 +00:00
Paul Tucker
385f7b8d0c
Change getAllocator() to allocator() in ThreadPoolDevice.
2018-07-31 13:52:18 -07:00
Gael Guennebaud
678a0dcb12
Merged in ezhulenev/eigen/tiling_3 (pull request PR-438)
...
Tiled tensor executor
2018-07-31 08:13:00 +00:00
Gael Guennebaud
679eece876
Speedup trivial tensor broadcasting on GPU by enforcing unaligned loads. See PR 437.
2018-07-31 10:10:14 +02:00
Eugene Zhulenev
966c2a7bb6
Rename Index to StorageIndex + use Eigen::Array and Eigen::Map when possible
2018-07-27 12:45:17 -07:00
Eugene Zhulenev
6913221c43
Add tiled evaluation support to TensorExecutor
2018-07-25 13:51:10 -07:00
Rasmus Munk Larsen
e478532625
Reduce the number of template specializations of classes related to tensor contraction to reduce binary size.
2018-07-27 12:36:34 -07:00
Eugene Zhulenev
d55efa6f0f
TensorBlockIO
2018-07-23 15:50:55 -07:00
Eugene Zhulenev
34a75c3c5c
Initial support of TensorBlock
2018-07-20 17:37:20 -07:00
Paul Tucker
d4afccde5a
Add test coverage for ThreadPoolDevice optional allocator.
2018-07-19 17:43:44 -07:00
Eugene Zhulenev
c58b874727
PR430: Convert count to the reducer type in MeanReducer
...
Without explicit conversion Tensorflow fails to compile, pset1 template deduction fails.
cannot convert '((const Eigen::internal::MeanReducer<Eigen::half>*)this)
->Eigen::internal::MeanReducer<Eigen::half>::packetCount_'
(type 'const DenseIndex {aka const long int}')
to type 'const type& {aka const Eigen::half&}'
return pdiv(vaccum, pset1<Packet>(packetCount_));
Honestly I’m not sure why it works in Eigen tests, because Eigen::half constructor is explicit, and why it stopped working in TF, I didn’t find any relevant changes since previous Eigen upgrade.
static_cast<T>(packetCount_) - breaks cxx11_tensor_reductions test for Eigen::half, also quite surprising.
2018-07-19 17:37:03 -07:00
Paul Tucker
4e9848fa86
Actually add optional Allocator* arg to ThreadPoolDevice().
2018-07-16 17:53:36 -07:00