Skip to content

Commit

Permalink
ggml: clarify view example
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bevenius <[email protected]>
  • Loading branch information
danbev committed May 14, 2024
1 parent cdd3b06 commit 6ac6f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fundamentals/ggml/src/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "ggml/ggml-backend.h"

int main(int argc, char **argv) {
printf("GGML reshape tensor examples\n");
printf("GGML view examples\n");

struct ggml_init_params params = {
.mem_size = 16*1024*1024,
Expand All @@ -27,7 +27,7 @@ int main(int argc, char **argv) {
ggml_set_f32_1d(x, 9, 10);

for (int i = 0; i < ggml_nelements(x); i++) {
printf("view[%d]: %f\n", i, ggml_get_f32_1d(x, i));
printf("x[%d]: %f\n", i, ggml_get_f32_1d(x, i));
}

printf("x tensor dimensions: %d\n", ggml_n_dims(x));
Expand Down

0 comments on commit 6ac6f64

Please sign in to comment.