Total quantization error on test data
| 41 | |
| 42 | // Total quantization error on test data |
| 43 | static float total_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) { |
| 44 | std::vector<uint8_t> tmp_q(2*test_size); |
| 45 | std::vector<float> tmp_out(test_size); |
| 46 | |
| 47 | qfns.from_float(test_data, tmp_q.data(), test_size); |
| 48 | qfns.to_float(tmp_q.data(), tmp_out.data(), test_size); |
| 49 | return array_rmse(test_data, tmp_out.data(), test_size); |
| 50 | } |
| 51 | |
| 52 | // Total quantization error on test data |
| 53 | static float reference_quantization_error(ggml_type_traits_t & qfns, size_t test_size, const float * test_data) { |
no test coverage detected