diff options
Diffstat (limited to 'llama.cpp/ggml/src/ggml-hexagon/htp/htp-ctx.h')
| -rw-r--r-- | llama.cpp/ggml/src/ggml-hexagon/htp/htp-ctx.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/llama.cpp/ggml/src/ggml-hexagon/htp/htp-ctx.h b/llama.cpp/ggml/src/ggml-hexagon/htp/htp-ctx.h new file mode 100644 index 0000000..a707d98 --- /dev/null +++ b/llama.cpp/ggml/src/ggml-hexagon/htp/htp-ctx.h | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #ifndef HTP_CTX_H | ||
| 2 | #define HTP_CTX_H | ||
| 3 | |||
| 4 | #include "hex-dma.h" | ||
| 5 | #include "worker-pool.h" | ||
| 6 | |||
| 7 | #include <assert.h> | ||
| 8 | #include <dspqueue.h> | ||
| 9 | #include <stdatomic.h> | ||
| 10 | #include <stdint.h> | ||
| 11 | |||
| 12 | #define HTP_MAX_NTHREADS 10 | ||
| 13 | |||
| 14 | // Main context for htp DSP backend | ||
| 15 | struct htp_context { | ||
| 16 | dspqueue_t queue; | ||
| 17 | dma_queue * dma[HTP_MAX_NTHREADS]; | ||
| 18 | worker_pool_context_t worker_pool; | ||
| 19 | uint32_t n_threads; | ||
| 20 | |||
| 21 | int thread_id; | ||
| 22 | int thread_prio; | ||
| 23 | |||
| 24 | uint8_t * vtcm_base; | ||
| 25 | size_t vtcm_size; | ||
| 26 | uint32_t vtcm_rctx; | ||
| 27 | |||
| 28 | atomic_bool vtcm_valid; | ||
| 29 | atomic_bool vtcm_inuse; | ||
| 30 | atomic_bool vtcm_needs_release; | ||
| 31 | |||
| 32 | uint32_t opmask; | ||
| 33 | }; | ||
| 34 | |||
| 35 | #endif /* HTP_CTX_H */ | ||
