diff options
author | 2016-10-14 09:24:34 -0800 | |
---|---|---|
committer | 2016-10-14 10:33:37 -0700 | |
commit | 079990d8b6bb4c60f23c4d0cc9ee29190ff13b9a (patch) | |
tree | 5960fe71304af60f08bd73833ff6f4f0d7e176dc /tensorflow/core/kernels/reshape_op.cc | |
parent | 40823cd91460263ada700062a5914c8e9f316fe9 (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/reshape_op.cc')
-rw-r--r-- | tensorflow/core/kernels/reshape_op.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tensorflow/core/kernels/reshape_op.cc b/tensorflow/core/kernels/reshape_op.cc index 7e720c2c08..cd6875eeb2 100644 --- a/tensorflow/core/kernels/reshape_op.cc +++ b/tensorflow/core/kernels/reshape_op.cc @@ -21,11 +21,12 @@ namespace tensorflow { REGISTER_KERNEL_BUILDER(Name("Reshape").Device(DEVICE_CPU).HostMemory("shape"), ReshapeOp); -#define REGISTER_GPU_KERNEL(type) \ - REGISTER_KERNEL_BUILDER(Name("Reshape") \ - .Device(DEVICE_GPU) \ - .HostMemory("shape") \ - .TypeConstraint<type>("T"), \ +#define REGISTER_GPU_KERNEL(type) \ + REGISTER_KERNEL_BUILDER(Name("Reshape") \ + .Device(DEVICE_GPU) \ + .HostMemory("shape") \ + .TypeConstraint<type>("T") \ + .TypeConstraint<int32>("Tshape"), \ ReshapeOp); TF_CALL_NUMBER_TYPES_NO_INT32(REGISTER_GPU_KERNEL); #undef REGISTER_GPU_KERNEL @@ -39,7 +40,8 @@ REGISTER_KERNEL_BUILDER(Name("Reshape") .HostMemory("tensor") .HostMemory("shape") .HostMemory("output") - .TypeConstraint<int32>("T"), + .TypeConstraint<int32>("T") + .TypeConstraint<int32>("Tshape"), ReshapeOp); #endif |