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

Function BM_TrivialFactory

tensorflow/stream_executor/lib/statusor_test.cc:533–543  ·  view source on GitHub ↗

Measure the time taken to call into the factory, return the value, determine that it is OK, and invoke a trivial function.

Source from the content-addressed store, hash-verified

531// Measure the time taken to call into the factory, return the value,
532// determine that it is OK, and invoke a trivial function.
533void BM_TrivialFactory(int iters) {
534 tensorflow::testing::StopTiming();
535 BenchmarkFactory<BenchmarkType> factory;
536 tensorflow::testing::StartTiming();
537 for (int i = 0; i != iters; ++i) {
538 BenchmarkType* result = factory.TrivialFactory();
539 if (result != nullptr) {
540 result->DoWork();
541 }
542 }
543}
544BENCHMARK(BM_TrivialFactory);
545
546// Measure the time taken to call into the factory, providing an

Callers

nothing calls this directly

Calls 3

StopTimingFunction · 0.85
StartTimingFunction · 0.85
DoWorkMethod · 0.80

Tested by

no test coverage detected