diff options
author | 2016-05-19 14:41:27 -0800 | |
---|---|---|
committer | 2016-05-19 15:53:03 -0700 | |
commit | 05932ecf0f60eba950c0ada4f2ab25d117089d11 (patch) | |
tree | 9115fbbb1a45a2729b068205db0e440ac1e12abb /tensorflow/core/kernels/random_op_test.cc | |
parent | f1ef5927cb742ab433b5d9f816f805562bf73500 (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.cc | 6 |
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; } } |