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

Function llama_format_tensor_shape

smallthinker/src/llama-impl.cpp:97–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97std::string llama_format_tensor_shape(const std::vector<int64_t> & ne) {
98 char buf[256];
99 snprintf(buf, sizeof(buf), "%5" PRId64, ne.at(0));
100 for (size_t i = 1; i < ne.size(); i++) {
101 snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ", %5" PRId64, ne.at(i));
102 }
103 return buf;
104}
105
106std::string llama_format_tensor_shape(const struct ggml_tensor * t) {
107 char buf[256];

Callers 3

llama_model_loaderMethod · 0.70
check_tensor_dimsMethod · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected