summaryrefslogtreecommitdiff
path: root/examples/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'examples/benchmark')
-rw-r--r--examples/benchmark/benchmark-matmult.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/benchmark/benchmark-matmult.cpp b/examples/benchmark/benchmark-matmult.cpp
index 284733b1..434e1d6b 100644
--- a/examples/benchmark/benchmark-matmult.cpp
+++ b/examples/benchmark/benchmark-matmult.cpp
@@ -129,13 +129,13 @@ int main(int argc, char ** argv) {
const ggml_type qtype = GGML_TYPE_Q4_1;
size_t ctx_size = 0;
- ctx_size += sizex*sizey*ggml_type_sizef(GGML_TYPE_F32);
- ctx_size += sizex*sizey*ggml_type_sizef(GGML_TYPE_F32);
- ctx_size += sizex*sizez*ggml_type_sizef(GGML_TYPE_F32);
- ctx_size += sizex*sizey*ggml_type_sizef(qtype);
- ctx_size += sizex*sizey*ggml_type_sizef(qtype);
- ctx_size += sizex*sizey*ggml_type_sizef(GGML_TYPE_F32); // BLAS
- ctx_size += sizex*sizey*ggml_type_sizef(GGML_TYPE_F32); // BLAS
+ ctx_size += ggml_row_size(GGML_TYPE_F32, sizex*sizey);
+ ctx_size += ggml_row_size(GGML_TYPE_F32, sizex*sizey);
+ ctx_size += ggml_row_size(GGML_TYPE_F32, sizex*sizez);
+ ctx_size += ggml_row_size(qtype, sizex*sizey);
+ ctx_size += ggml_row_size(qtype, sizex*sizey);
+ ctx_size += ggml_row_size(GGML_TYPE_F32, sizex*sizey); // BLAS
+ ctx_size += ggml_row_size(GGML_TYPE_F32, sizex*sizey); // BLAS
ctx_size += 1024*1024*16;
printf("Allocating Memory of size %zi bytes, %zi MB\n",ctx_size, (ctx_size/1024/1024));