Fix CI: quantization unit tests, editorconfig

This commit is contained in:
Stephan Walter 2023-04-22 12:35:31 +02:00
parent 5f939498d5
commit d950154d25
4 changed files with 3 additions and 4 deletions

View file

@ -94,7 +94,7 @@ int main(int argc, char ** argv) {
// params.prompt = R"(// this function checks if the number n is prime
//bool is_prime(int n) {)";
llama_context * ctx;
g_ctx = &ctx;

View file

@ -2256,7 +2256,6 @@ std::vector<std::pair<std::string, struct ggml_tensor *>>& llama_internal_get_te
// Returns the size of the state
size_t llama_get_state_size(struct llama_context * ctx) {
const size_t s_bool = sizeof(int32_t);
// we don't know size of rng until we actually serialize it. so reserve more than enough memory for its serialized state.
// for reference, std::mt19937(1337) serializes to 6701 bytes.
const size_t s_rng_size = sizeof(size_t);

View file

@ -120,7 +120,7 @@ int main(int argc, char * argv[]) {
ggml_type type = (ggml_type) i;
quantize_fns_t qfns = ggml_internal_get_quantize_fn(i);
if (qfns.quantize_row_q) {
if (qfns.quantize_row_q && qfns.dequantize_row_q) {
const float total_error = total_quantization_error(qfns, test_size, test_data.data());
failed = !(total_error < MAX_QUANTIZATION_TOTAL_ERROR);
num_failed += failed;

View file

@ -225,7 +225,7 @@ int main(int argc, char * argv[]) {
continue;
}
if (qfns.quantize_row_q) {
if (qfns.quantize_row_q && qfns.dequantize_row_q) {
printf("%s\n", ggml_type_name(type));
if (params.op_quantize_row_q_reference) {