diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-07 17:13:44 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-04-07 17:13:44 -0700 |
commit | a6d08be9b2e1b9e11a488419b7dd0affcc321a32 (patch) | |
tree | e1f607b5e333d06ee3a69cabb33036c1547d3ca3 /bench/tensors | |
parent | a02ec09511014b4c5fa0be97bfe3a6d3591f730f (diff) |
Fixed the benchmarking of fp16 coefficient wise operations
Diffstat (limited to 'bench/tensors')
-rw-r--r-- | bench/tensors/tensor_benchmarks.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bench/tensors/tensor_benchmarks.h b/bench/tensors/tensor_benchmarks.h index a4f97728d..16b388abf 100644 --- a/bench/tensors/tensor_benchmarks.h +++ b/bench/tensors/tensor_benchmarks.h @@ -248,7 +248,7 @@ template <typename Device, typename T> class BenchmarkSuite { StartBenchmarkTiming(); for (int iter = 0; iter < num_iters; ++iter) { - C.device(device_) = A * A.constant(3.14) + B * B.constant(2.7); + C.device(device_) = A * A.constant(static_cast<T>(3.14)) + B * B.constant(static_cast<T>(2.7)); } // Record the number of FLOP executed per second (2 multiplications and // 1 addition per value) |