MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / total_quantization_error

Function total_quantization_error

external/ggml/tests/test-quantize-fns.cpp:52–59  ·  view source on GitHub ↗

Total quantization error on test data

Source from the content-addressed store, hash-verified

50
51// Total quantization error on test data
52static float total_quantization_error(const ggml_type_traits * qfns, const ggml_type_traits_cpu * qfns_cpu, size_t test_size, const float * test_data) {
53 std::vector<uint8_t> tmp_q(2*test_size);
54 std::vector<float> tmp_out(test_size);
55
56 qfns_cpu->from_float(test_data, tmp_q.data(), test_size);
57 qfns->to_float(tmp_q.data(), tmp_out.data(), test_size);
58 return array_rmse(test_data, tmp_out.data(), test_size);
59}
60
61// Total quantization error on test data
62static float reference_quantization_error(const ggml_type_traits * qfns, const ggml_type_traits_cpu * qfns_cpu, size_t test_size, const float * test_data) {

Callers 1

mainFunction · 0.85

Calls 2

array_rmseFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected