diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-14 14:31:59 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-10-14 14:31:59 -0700 |
commit | d380c23b2cc0b02e10819e779c73cde2c62603b2 (patch) | |
tree | 09d204c87ed6a9f55aa0c6305d7e4199a71dbf8a /unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h | |
parent | 39fb9eeccf2e79542acad9bbf5196e462c1b2cee (diff) |
Block evaluation for TensorGenerator/TensorReverse/TensorShuffling
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h index 20591da33..7eaf1f09e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h @@ -368,7 +368,8 @@ struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device> } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 - blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch) const { + blockV2(TensorBlockDesc& desc, TensorBlockScratch& scratch, + bool /*root_of_expr_ast*/ = false) const { const Index chip_dim = m_dim.actualDim(); DSizes<Index, NumInputDims> input_block_dims; @@ -390,6 +391,7 @@ struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device> } ArgTensorBlock arg_block = m_impl.blockV2(arg_desc, scratch); + if (!arg_desc.HasDestinationBuffer()) desc.DropDestinationBuffer(); if (arg_block.data() != NULL) { // Forward argument block buffer if possible. @@ -405,6 +407,7 @@ struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device> bool materialized_in_output; if (output_buffer != NULL) { + desc.DropDestinationBuffer(); materialized_in_output = true; } else { |