mirror of
https://github.com/RYDE-WORK/llama.cpp.git
synced 2026-01-31 04:33:15 +08:00
benchmark : fix result validation in benchmark-q4_0-matmult (#987)
This commit is contained in:
parent
106faaf297
commit
c12b14b77f
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
float tensor_sum_elements(struct ggml_tensor * tensor) {
|
float tensor_sum_elements(struct ggml_tensor * tensor) {
|
||||||
float sum = 0;
|
float sum = 0;
|
||||||
if (tensor->type==6) {
|
if (tensor->type==GGML_TYPE_F32) {
|
||||||
for (int j = 0; j < tensor->ne[1]; j++) {
|
for (int j = 0; j < tensor->ne[1]; j++) {
|
||||||
for (int k = 0; k < tensor->ne[0]; k++) {
|
for (int k = 0; k < tensor->ne[0]; k++) {
|
||||||
sum += ((float *) tensor->data)[j*tensor->ne[0]+k];
|
sum += ((float *) tensor->data)[j*tensor->ne[0]+k];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user