MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / tensor_comparer

Class tensor_comparer

subprojects/llama.cpp/tools/imatrix/imatrix.cpp:1105–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103 }
1104
1105 struct tensor_comparer {
1106 bool operator()(const tensor_statistics & a, const tensor_statistics & b) const {
1107 std::string layer, name_a, name_b;
1108 ;
1109 process_tensor_name(a.tensor, layer, name_a);
1110 process_tensor_name(b.tensor, layer, name_b);
1111 return name_a < name_b || (name_a == name_b && a.total_sqract > b.total_sqract);
1112 }
1113 };
1114 std::sort(ts.begin(), ts.end(), tensor_comparer());
1115
1116 struct weighted_stats {

Callers 1

show_statisticsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected