File tree Expand file tree Collapse file tree 3 files changed +52
-61
lines changed Expand file tree Collapse file tree 3 files changed +52
-61
lines changed Original file line number Diff line number Diff line change 33
44#include " ggml.h"
55#include " ggml-impl.h"
6- #include " ggml-zdnn-impl.h"
76
87#include " zdnn.h"
98
9+ #include < vector>
10+ #include < memory>
11+
12+ #define GGML_ZDNN_NAME " zDNN"
13+ #define GGML_ZDNN_VERSION ZDNN_VERNUM
14+
15+ #define ZDNN_CHECK (stmt ) \
16+ do { \
17+ zdnn_status status = (stmt); \
18+ GGML_ASSERT (status == ZDNN_OK); \
19+ } while (0 );
20+
21+ struct ggml_backend_zdnn_device_context {
22+ int zdnn_device;
23+ int zdnn_device_ref_count;
24+
25+ bool has_parmblkformat_0;
26+ bool has_parmblkformat_1; // checks for z17
27+
28+ size_t max_size;
29+
30+ char name[128 ];
31+ };
32+
33+ struct ggml_backend_zdnn_context {
34+ int device;
35+ ggml_cgraph * gf;
36+ };
37+
38+ struct ggml_backend_zdnn_buffer {
39+ void * data;
40+ ggml_backend_zdnn_buffer * extra; // for bias, etc.
41+ size_t size;
42+
43+ zdnn_tensor_desc pre_tfm_desc;
44+ zdnn_tensor_desc tfm_desc;
45+ zdnn_ztensor ztensor;
46+
47+ char name[GGML_MAX_NAME];
48+ };
49+
50+ struct ggml_backend_zdnn_buffer_context {
51+ void * all_data;
52+ size_t all_size;
53+ bool owned;
54+
55+ int n_buffers;
56+ std::vector<std::unique_ptr<ggml_backend_zdnn_buffer>> buffers;
57+ };
58+
1059#endif // GGML_ZDNN_COMMON_HPP
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- #include " ggml-zdnn-impl.hpp "
1+ #include " ggml-zdnn.h "
22#include " ggml-impl.h"
33#include " ggml-backend-impl.h"
44
88
99#include < vector>
1010#include < memory>
11- #include < csignal>
11+ #include < csignal> // raise(SIGTRAP)
1212#include < unistd.h>
1313
1414inline zdnn_data_types ggml_zdnn_type_mapping (ggml_type type) {
You can’t perform that action at this time.
0 commit comments