mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
Fixed the benchmarking of fp16 coefficient wise operations
This commit is contained in:
parent
a02ec09511
commit
a6d08be9b2
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user