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

Method file_offset

llama.cpp:2116–2124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2114 }
2115
2116 size_t file_offset(const char * name) const {
2117 const int idx = gguf_find_tensor(ctx_gguf, name);
2118
2119 if (idx < 0) {
2120 throw std::runtime_error(format("%s: tensor '%s' not found in the file", __func__, name));
2121 }
2122
2123 return gguf_get_data_offset(ctx_gguf) + gguf_get_tensor_offset(ctx_gguf, idx);
2124 }
2125
2126 void load_data_for(struct ggml_tensor * cur) const {
2127 const size_t offs = file_offset(ggml_get_name(cur));

Callers

nothing calls this directly

Calls 4

gguf_find_tensorFunction · 0.70
formatFunction · 0.70
gguf_get_data_offsetFunction · 0.70
gguf_get_tensor_offsetFunction · 0.70

Tested by

no test coverage detected