aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/reduction_ops_min.cc
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2016-10-14 09:24:34 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-10-14 10:33:37 -0700
commit079990d8b6bb4c60f23c4d0cc9ee29190ff13b9a (patch)
tree5960fe71304af60f08bd73833ff6f4f0d7e176dc /tensorflow/core/kernels/reduction_ops_min.cc
parent40823cd91460263ada700062a5914c8e9f316fe9 (diff)
Add the int32 TypeConstraint to all kernels that could take both int32
and int64 but currently do not have an int64 capable kernel. Change: 136170323
Diffstat (limited to 'tensorflow/core/kernels/reduction_ops_min.cc')
-rw-r--r--tensorflow/core/kernels/reduction_ops_min.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/tensorflow/core/kernels/reduction_ops_min.cc b/tensorflow/core/kernels/reduction_ops_min.cc
index c567aca0b0..c362bc8867 100644
--- a/tensorflow/core/kernels/reduction_ops_min.cc
+++ b/tensorflow/core/kernels/reduction_ops_min.cc
@@ -17,9 +17,12 @@ limitations under the License.
namespace tensorflow {
-#define REGISTER_CPU_KERNELS(type) \
- REGISTER_KERNEL_BUILDER( \
- Name("Min").Device(DEVICE_CPU).TypeConstraint<type>("T"), \
+#define REGISTER_CPU_KERNELS(type) \
+ REGISTER_KERNEL_BUILDER( \
+ Name("Min") \
+ .Device(DEVICE_CPU) \
+ .TypeConstraint<type>("T") \
+ .TypeConstraint<int32>("Tidx"), \
ReductionOp<CPUDevice, type, Eigen::internal::MinReducer<type>>);
TF_CALL_REAL_NUMBER_TYPES(REGISTER_CPU_KERNELS);
#undef REGISTER_CPU_KERNELS
@@ -31,6 +34,7 @@ TF_CALL_REAL_NUMBER_TYPES(REGISTER_CPU_KERNELS);
Name("Min") \
.Device(DEVICE_GPU) \
.TypeConstraint<type>("T") \
+ .TypeConstraint<int32>("Tidx") \
.HostMemory("reduction_indices"), \
ReductionOp<GPUDevice, type, Eigen::internal::MinReducer<type>>);
REGISTER_GPU_KERNELS(float);
@@ -45,7 +49,8 @@ REGISTER_KERNEL_BUILDER(
.HostMemory("reduction_indices")
.HostMemory("input")
.HostMemory("output")
- .TypeConstraint<int32>("T"),
+ .TypeConstraint<int32>("T")
+ .TypeConstraint<int32>("Tidx"),
ReductionOp<CPUDevice, int32, Eigen::internal::MinReducer<int32>>);
#undef REGISTER_GPU_KERNELS