Use int32 GPU kernel for StopGradient
authorA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 23 Mar 2018 11:41:47 +0000 (04:41 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 23 Mar 2018 11:44:31 +0000 (04:44 -0700)
PiperOrigin-RevId: 190204238

tensorflow/core/kernels/identity_op.cc

index b5603fe..dffb4d7 100644 (file)
@@ -129,6 +129,12 @@ REGISTER_GPU_KERNEL(Variant);
                               .HostMemory("output")           \
                               .TypeConstraint<type>("T"),     \
                           IdentityOp);                        \
+  REGISTER_KERNEL_BUILDER(Name("StopGradient")                \
+                              .Device(DEVICE_GPU)             \
+                              .HostMemory("input")            \
+                              .HostMemory("output")           \
+                              .TypeConstraint<type>("T"),     \
+                          IdentityOp);                        \
   REGISTER_KERNEL_BUILDER(Name("PlaceholderWithDefault")      \
                               .Device(DEVICE_GPU)             \
                               .HostMemory("input")            \