aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/random_op_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-05-19 14:41:27 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-19 15:53:03 -0700
commit05932ecf0f60eba950c0ada4f2ab25d117089d11 (patch)
tree9115fbbb1a45a2729b068205db0e440ac1e12abb /tensorflow/core/kernels/random_op_test.cc
parentf1ef5927cb742ab433b5d9f816f805562bf73500 (diff)
Fix typo in random_op_test benchmark so it prefers int32s.
This fixes the benchmark so it works on GPUs. Without this change, we try to instantiate a RandomUniform over int64s on GPUs, and that doesn't exist. Change: 122777271
Diffstat (limited to 'tensorflow/core/kernels/random_op_test.cc')
-rw-r--r--tensorflow/core/kernels/random_op_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/core/kernels/random_op_test.cc b/tensorflow/core/kernels/random_op_test.cc
index 9bbde46aae..68c6af656c 100644
--- a/tensorflow/core/kernels/random_op_test.cc
+++ b/tensorflow/core/kernels/random_op_test.cc
@@ -25,12 +25,12 @@ namespace tensorflow {
Tensor VecShape(int64 v) {
if (v >= std::numeric_limits<int32>::max()) {
- Tensor shape(DT_INT32, TensorShape({1}));
+ Tensor shape(DT_INT64, TensorShape({1}));
shape.vec<int64>()(0) = v;
return shape;
} else {
- Tensor shape(DT_INT64, TensorShape({1}));
- shape.vec<int64>()(0) = v;
+ Tensor shape(DT_INT32, TensorShape({1}));
+ shape.vec<int32>()(0) = v;
return shape;
}
}