2 #include "output_formatter.h"     7 const uint64_t MS_IN_SECOND = 1000;
    15   static float get_mean(
const std::vector<T>& values) {
    16     float sum = std::accumulate(values.begin(), values.end(), 0.0);
    17     return sum / values.size();
    21   static float get_stdev(
const std::vector<T>& values) {
    22     auto mean = get_mean(values);
    24         std::inner_product(values.begin(), values.end(), values.begin(), 0.0);
    25     return std::sqrt(sq_sum / values.size() - mean * mean);
    30       const std::vector<float>& durations_ms,
    32       uint64_t iterations)
 override {
    33     auto mean = get_mean(durations_ms);
    34     auto throughput = iterations / (mean / MS_IN_SECOND);
    35     return std::string(
"\n\n====================================\n") +
    36         "Predictor benchmark finished with " + c10::to_string(threads) +
    37         " threads.\nThroughput:\t\t" + c10::to_string(throughput) +
    38         " iterations/s\nVariation:\t\t" +
    39         c10::to_string(get_stdev(durations_ms) * 100 / mean) +
    40         "%\n====================================";
 A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...