MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / get_tensor

Function get_tensor

examples/llava/clip.cpp:112–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112static 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
121static std::string get_ftype(int ftype) {
122 switch (ftype) {

Callers 2

load_tensorsMethod · 0.85
clip_model_loadFunction · 0.85

Calls 3

formatFunction · 0.70
ggml_get_tensorFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected