summaryrefslogtreecommitdiff
path: root/tests/test-quantize-perf.cpp
diff options
context:
space:
mode:
authorslaren <slarengh@gmail.com>2023-12-14 20:05:21 +0100
committerGitHub <noreply@github.com>2023-12-14 20:05:21 +0100
commit6744dbe924a317e3e2a5a2a4a2037061b2223449 (patch)
tree5eb37829f6ce586c06b6bae38516e2a6cbc992cc /tests/test-quantize-perf.cpp
parentcafcd4f89500b8afef722cdb08088eceb8a22572 (diff)
ggml : use ggml_row_size where possible (#4472)
* ggml : use ggml_row_size where possible ggml-ci * ggml : move ggml_nbytes_split to ggml-cuda.cu
Diffstat (limited to 'tests/test-quantize-perf.cpp')
-rw-r--r--tests/test-quantize-perf.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-quantize-perf.cpp b/tests/test-quantize-perf.cpp
index 62d0190f..09d410b7 100644
--- a/tests/test-quantize-perf.cpp
+++ b/tests/test-quantize-perf.cpp
@@ -286,7 +286,7 @@ int main(int argc, char * argv[]) {
qfns.from_float_reference(test_data1, test_q1, size);
return test_q1[0];
};
- size_t quantized_size = size / ggml_blck_size(type) * ggml_type_size(type);
+ size_t quantized_size = ggml_row_size(type, size);
benchmark_function(size, quantized_size, iterations, quantize_fn);
}
printf("\n");
@@ -300,7 +300,7 @@ int main(int argc, char * argv[]) {
qfns.from_float(test_data1, test_q1, size);
return test_q1[0];
};
- size_t quantized_size = size / ggml_blck_size(type) * ggml_type_size(type);
+ size_t quantized_size = ggml_row_size(type, size);
benchmark_function(size, quantized_size, iterations, quantize_fn);
}
printf("\n");
@@ -315,7 +315,7 @@ int main(int argc, char * argv[]) {
qfns.to_float(test_q1, test_out, size);
return test_out[0];
};
- size_t quantized_size = size / ggml_blck_size(type) * ggml_type_size(type);
+ size_t quantized_size = ggml_row_size(type, size);
benchmark_function(size, quantized_size, iterations, quantize_fn);
}
printf("\n");
@@ -330,7 +330,7 @@ int main(int argc, char * argv[]) {
vdot.from_float(test_data1, test_q1, size);
return test_q1[0];
};
- size_t quantized_size = size / ggml_blck_size(type) * ggml_type_size(type);
+ size_t quantized_size = ggml_row_size(type, size);
benchmark_function(size, quantized_size, iterations, quantize_fn);
}
printf("\n");
@@ -347,7 +347,7 @@ int main(int argc, char * argv[]) {
qfns.vec_dot(size, &result, test_q1, test_q2);
return result;
};
- size_t quantized_size = size / ggml_blck_size(type) * ggml_type_size(type);
+ size_t quantized_size = ggml_row_size(type, size);
benchmark_function(size, quantized_size, iterations, quantize_fn);
}
printf("\n");