interplane.Get Omega
Read in your language

ggml

[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)

Brought by drakestapleton

branch master Branches Tags History

ggml / src / ggml-hexagon / htp / hvx-types.h

36 lines · 700 bytes Raw Blame History
1#ifndef HVX_TYPES_H
2#define HVX_TYPES_H
3
4#include <stdbool.h>
5#include <stdint.h>
6
7#include <hexagon_types.h>
8
9#define SIZEOF_FP32 (4)
10#define SIZEOF_FP16 (2)
11#define VLEN (128)
12#define VLEN_FP32 (VLEN / SIZEOF_FP32)
13#define VLEN_FP16 (VLEN / SIZEOF_FP16)
14
15typedef union {
16 HVX_Vector v;
17 uint8_t b[VLEN];
18 uint16_t h[VLEN_FP16];
19 uint32_t w[VLEN_FP32];
20 __fp16 fp16[VLEN_FP16];
21 float fp32[VLEN_FP32];
22} __attribute__((aligned(VLEN), packed)) HVX_VectorAlias;
23
24typedef struct {
25 HVX_Vector v[2];
26} HVX_Vector_x2;
27
28typedef struct {
29 HVX_Vector v[4];
30} HVX_Vector_x4;
31
32typedef struct {
33 HVX_Vector v[8];
34} HVX_Vector_x8;
35
36#endif /* HVX_TYPES_H */