MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/compiler/aot/benchmark_test.cc:28–41  ·  view source on GitHub ↗

There isn't much we can verify in a stable fashion, so we just run the benchmark with max_iters, and ensure we end up with that many iter stats.

Source from the content-addressed store, hash-verified

26// There isn't much we can verify in a stable fashion, so we just run the
27// benchmark with max_iters, and ensure we end up with that many iter stats.
28TEST(Benchmark, Benchmark) {
29 AddComp add;
30
31 Options options;
32 options.max_iters = 1;
33 Stats stats1;
34 Benchmark(options, [&] { add.Run(); }, &stats1);
35 EXPECT_EQ(stats1.per_iter_us.size(), 1);
36
37 options.max_iters = 5;
38 Stats stats5;
39 Benchmark(options, [&] { add.Run(); }, &stats5);
40 EXPECT_EQ(stats5.per_iter_us.size(), 5);
41}
42
43} // namespace
44} // namespace benchmark

Callers

nothing calls this directly

Calls 3

BenchmarkFunction · 0.70
RunMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected