aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/pad_op.h
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 11:52:11 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-11-11 11:52:11 -0800
commit3961abed9560cd852fff4add393b451483bbc3af (patch)
tree57b7d3180ff4db6f6c8c5897dec252b1c2b6380d /tensorflow/core/kernels/pad_op.h
parent9a00a61aa4ae59339b14d29650a591732901c264 (diff)
Upstream a number of changes to git.
Changes: - Updates to README / os_setup for common installation issues by ebrevdo, vrv, wicke, anelia, dga - Add a test for backwards compatibility checks by Josh - Simplifications to tiling/padding of scalars by bsteiner - Improve listing of devices when no devices are known by Matthieu Base CL: 107607137
Diffstat (limited to 'tensorflow/core/kernels/pad_op.h')
-rw-r--r--tensorflow/core/kernels/pad_op.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/pad_op.h b/tensorflow/core/kernels/pad_op.h
index c4f8a4abda..204a2a13a4 100644
--- a/tensorflow/core/kernels/pad_op.h
+++ b/tensorflow/core/kernels/pad_op.h
@@ -21,6 +21,15 @@ struct Pad {
}
};
+template <typename Device, typename T>
+struct Pad<Device, T, 0> {
+ // In the scalar case we simply copy the input.
+ void operator()(const Device& d, typename TTypes<T, 0>::Tensor output,
+ typename TTypes<T, 0>::ConstTensor input,
+ Eigen::array<std::pair<int32, int32>, 0>) {
+ output.device(d) = input;
+ }
+};
} // namespace functor
} // namespace tensorflow