diff --git a/tensorflow/core/kernels/eigen_contraction_kernel.h b/tensorflow/core/kernels/eigen_contraction_kernel.h index ef4b9dbc012..2a4cfd1637c 100644 --- a/tensorflow/core/kernels/eigen_contraction_kernel.h +++ b/tensorflow/core/kernels/eigen_contraction_kernel.h @@ -524,14 +524,7 @@ struct GemmKernelProvider { \ TensorContractionKernel(StorageIndex m, StorageIndex k, StorageIndex n, \ StorageIndex bm, StorageIndex bk, StorageIndex bn) \ - : m(m), \ - k(k), \ - n(n), \ - bm(bm), \ - bk(bk), \ - bn(bn), \ - nm0(bm > 0 ? divup(m, bm) : 0), \ - nn0(bn > 0 ? divup(n, bn) : 0) {} \ + : m(m), k(k), n(n), bm(bm), bk(bk), bn(bn) {} \ \ enum { HasBeta = true }; \ \ @@ -616,7 +609,8 @@ struct GemmKernelProvider \ - EIGEN_DEVICE_FUNC void deallocate(Device& d, BlockMemHandle handle) { \ + EIGEN_DEVICE_FUNC static void deallocate(Device& d, \ + BlockMemHandle handle) { \ BlockMemAllocator::deallocate(d, handle); \ } \ \ @@ -626,7 +620,8 @@ struct GemmKernelProvider 0 ? divup(n, bn) : 0, lhsBlock); \ \ if (!is_direct_access) { \ lhsBlock->is_direct_access = false; \ @@ -645,7 +640,8 @@ struct GemmKernelProvider 0 ? divup(m, bm) : 0, rhsBlock); \ \ if (!is_direct_access) { \ rhsBlock->is_direct_access = false; \ @@ -723,9 +719,6 @@ struct GemmKernelProvider { \ TensorContractionKernel(StorageIndex m, StorageIndex k, StorageIndex n, \ StorageIndex bm, StorageIndex bk, StorageIndex bn) \ - : m(m), \ - k(k), \ - n(n), \ - bm(bm), \ - bk(bk), \ - bn(bn), \ - nm0(bm > 0 ? divup(m, bm) : 0), \ - nn0(bn > 0 ? divup(n, bn) : 0) {} \ + : m(m), k(k), n(n), bm(bm), bk(bk), bn(bn) {} \ \ enum { HasBeta = true }; \ \ @@ -818,7 +804,8 @@ struct GemmKernelProvider \ - EIGEN_DEVICE_FUNC void deallocate(Device& d, BlockMemHandle handle) { \ + EIGEN_DEVICE_FUNC static void deallocate(Device& d, \ + BlockMemHandle handle) { \ BlockMemAllocator::deallocate(d, handle); \ } \ \ @@ -827,7 +814,8 @@ struct GemmKernelProvider 0 ? divup(n, bn) : 0, lhsBlock); \ \ if (!is_direct_access) { \ lhsBlock->is_direct_access = false; \ @@ -840,7 +828,8 @@ struct GemmKernelProvider 0 ? divup(m, bm) : 0, rhsBlock); \ \ if (!is_direct_access) { \ rhsBlock->is_direct_access = false; \ @@ -890,9 +879,6 @@ struct GemmKernelProvider