diff options
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h index 098110217..9b835c4de 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorChipping.h @@ -294,13 +294,14 @@ struct TensorEvaluator<const TensorChippingOp<DimId, ArgType>, Device> TensorOpCost(0, 0, cost, vectorized, PacketSize); } - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void getResourceRequirements( - std::vector<internal::TensorOpResourceRequirements>* resources) const { - Eigen::Index block_total_size_max = numext::maxi<Eigen::Index>( - 1, m_device.lastLevelCacheSize() / sizeof(Scalar)); - resources->push_back(internal::TensorOpResourceRequirements( - internal::kSkewedInnerDims, block_total_size_max)); - m_impl.getResourceRequirements(resources); + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + internal::TensorBlockV2ResourceRequirements getResourceRequirements() const { + const size_t target_block_size = + numext::maxi<size_t>(1, m_device.lastLevelCacheSize() / sizeof(Scalar)); + + return internal::TensorBlockV2ResourceRequirements::merge( + {internal::TensorBlockV2ShapeType::kSkewedInnerDims, target_block_size}, + m_impl.getResourceRequirements()); } EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockV2 |