Fixed the benchmarking of fp16 coefficient wise operations

This commit is contained in:
Benoit Steiner 2016-04-07 17:13:44 -07:00
parent a02ec09511
commit a6d08be9b2

View File

@ -248,7 +248,7 @@ template <typename Device, typename T> class BenchmarkSuite {
StartBenchmarkTiming(); StartBenchmarkTiming();
for (int iter = 0; iter < num_iters; ++iter) { 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 // Record the number of FLOP executed per second (2 multiplications and
// 1 addition per value) // 1 addition per value)