From 1eff6cf8a77f1b8699671d31f8f307a6fd9170ea Mon Sep 17 00:00:00 2001 From: Yuefeng Zhou Date: Tue, 20 Feb 2018 16:50:05 -0800 Subject: Use device's allocate function instead of internal::aligned_malloc. This would make it easier to track memory usage in device instances. --- unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h') diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h index d30cc96ab..6fb69910e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorContractionThreadPool.h @@ -377,7 +377,7 @@ struct TensorEvaluator(bm_ * bk_ * sizeof(LhsScalar), align) * align; size_t rhs_size = divup(bn_ * bk_ * sizeof(RhsScalar), align) * align; - packed_mem_ = static_cast(internal::aligned_malloc( + packed_mem_ = static_cast(device_.allocate( (nm0_ * lhs_size + nn0_ * rhs_size) * std::min(nk_, P - 1))); char* mem = static_cast(packed_mem_); for (Index x = 0; x < numext::mini(nk_, P - 1); x++) { @@ -399,7 +399,7 @@ struct TensorEvaluator