diff options
Diffstat (limited to 'tensorflow/core/kernels/conv_grad_input_ops.cc')
-rw-r--r-- | tensorflow/core/kernels/conv_grad_input_ops.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tensorflow/core/kernels/conv_grad_input_ops.cc b/tensorflow/core/kernels/conv_grad_input_ops.cc index 63a775afa8..95301b170f 100644 --- a/tensorflow/core/kernels/conv_grad_input_ops.cc +++ b/tensorflow/core/kernels/conv_grad_input_ops.cc @@ -420,9 +420,8 @@ class Conv2DCustomBackpropInputOp : public OpKernel { const int output_image_size = dims.spatial_dims[0].output_size * dims.spatial_dims[1].output_size; - // TODO(andydavis) Get L2/L3 cache sizes from device. - const size_t l2_cache_size = 256LL << 10; - const size_t l3_cache_size = 30LL << 20; + const size_t l2_cache_size = Eigen::l2CacheSize(); + const size_t l3_cache_size = Eigen::l3CacheSize(); // Use L3 cache size as target working set size. const size_t target_working_set_size = l3_cache_size / sizeof(T); |