MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / combine_error_stats

Function combine_error_stats

examples/quantize-stats/quantize-stats.cpp:97–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97static void combine_error_stats(error_stats & into, const error_stats & from) {
98 into.num_samples += from.num_samples;
99 into.total_error += from.total_error;
100 if (from.max_error > into.max_error) into.max_error = from.max_error;
101 for (size_t i=0; i<HISTOGRAM_BUCKETS; ++i) into.error_histogram[i] += from.error_histogram[i];
102}
103
104static double find_quantile(const error_stats & stats, double quantile) {
105 double sum = std::accumulate(std::begin(stats.error_histogram), std::end(stats.error_histogram), 0.0);

Callers 1

test_roundtrip_on_layerFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_roundtrip_on_layerFunction · 0.56