Skip to content

Commit

Permalink
examples: refine tensor dump
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwg committed Jun 10, 2024
1 parent 2c96a5c commit 3695a2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/benchmark/benchmark-matmult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ typedef struct {
} block_q8_0;

static inline float ggml_compute_fp16_to_fp32(uint16_t h) {
#if defined(__ARM_NEON)
__fp16 tmp;
memcpy(&tmp, &h, sizeof(uint16_t));
return (float) tmp;
#else
uint16_t tmp;
memcpy(&tmp, &h, sizeof(uint16_t));
return (float) tmp;
#endif
}

static float tensor_sum_elements(const ggml_tensor * tensor) {
Expand Down

0 comments on commit 3695a2b

Please sign in to comment.