| 110 | } |
| 111 | |
| 112 | static struct ggml_tensor * get_tensor(struct ggml_context * ctx, const std::string & name) { |
| 113 | struct ggml_tensor * cur = ggml_get_tensor(ctx, name.c_str()); |
| 114 | if (!cur) { |
| 115 | throw std::runtime_error(format("%s: unable to find tensor %s\n", __func__, name.c_str())); |
| 116 | } |
| 117 | |
| 118 | return cur; |
| 119 | } |
| 120 | |
| 121 | static std::string get_ftype(int ftype) { |
| 122 | switch (ftype) { |
no test coverage detected