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

Function usage

tests/test-quantize-perf.cpp:110–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static void usage(char * argv[]) {
111 printf("Benchmark quantization specific functions on synthetic data\n");
112 printf("\n");
113 printf("usage: %s [options]\n", argv[0]);
114 printf("\n");
115 printf("options: (default)\n");
116 printf(" -h, --help show this help message and exit\n");
117 printf(" --size SIZE set test size, divisible by 32 (L1_SIZE:%d)\n", L1_SIZE);
118 printf(" -3 use size as L1, L2, L3 sizes (L1:%d L2:%d L3:%d)\n", L1_SIZE, L2_SIZE, L3_SIZE);
119 printf(" -4 use size as L1, L2, L3, MEM sizes (L1:%d L2:%d L3:%d MEM:%d)\n", L1_SIZE, L2_SIZE, L3_SIZE, MEM_SIZE);
120 printf(" --op OP set test opration as quantize_row_q_reference, quantize_row_q, dequantize_row_q,\n");
121 printf(" quantize_row_q_dot, vec_dot_q (all)\n");
122 printf(" --type TYPE set test type as");
123 for (int i = 0; i < GGML_TYPE_COUNT; i++) {
124 ggml_type type = (ggml_type) i;
125 ggml_type_traits_t qfns = ggml_internal_get_type_traits(type);
126 if (ggml_type_name(type) != NULL) {
127 if (qfns.from_float && qfns.to_float) {
128 printf(" %s", ggml_type_name(type));
129 }
130 }
131 }
132 printf(" (all)\n");
133 printf(" --alignment-offset OFFSET\n");
134 printf(" set alignment offset as OFFSET (0)\n");
135 printf(" -i NUM, --iterations NUM\n");
136 printf(" set test iteration number (%d)\n", ITERATIONS);
137}
138
139int main(int argc, char * argv[]) {
140 quantize_perf_params params {};

Callers 1

mainFunction · 0.70

Calls 3

printfFunction · 0.85
ggml_type_nameFunction · 0.50

Tested by

no test coverage detected