@@ -143,7 +143,7 @@ void test_roundtrip_on_chunk(
143
143
const ggml_tensor * layer,
144
144
int64_t offset,
145
145
int64_t chunk_size,
146
- const quantize_fns_t & qfns,
146
+ const ggml_type_handling_t & qfns,
147
147
bool use_reference,
148
148
float * input_scratch,
149
149
char * quantized_scratch,
@@ -159,11 +159,11 @@ void test_roundtrip_on_chunk(
159
159
}
160
160
161
161
if (use_reference) {
162
- qfns.quantize_row_q_reference (input_scratch, quantized_scratch, chunk_size);
162
+ qfns.from_float_reference (input_scratch, quantized_scratch, chunk_size);
163
163
} else {
164
- qfns.quantize_row_q (input_scratch, quantized_scratch, chunk_size);
164
+ qfns.from_float (input_scratch, quantized_scratch, chunk_size);
165
165
}
166
- qfns.dequantize_row_q (quantized_scratch, output_scratch, chunk_size);
166
+ qfns.to_float (quantized_scratch, output_scratch, chunk_size);
167
167
168
168
update_error_stats (chunk_size, input_scratch, output_scratch, stats);
169
169
}
@@ -173,7 +173,7 @@ void test_roundtrip_on_chunk(
173
173
void test_roundtrip_on_layer (
174
174
std::string & name,
175
175
bool print_layer_stats,
176
- const quantize_fns_t & qfns,
176
+ const ggml_type_handling_t & qfns,
177
177
bool use_reference,
178
178
const ggml_tensor * layer,
179
179
std::vector<float > & input_scratch,
@@ -374,8 +374,8 @@ int main(int argc, char ** argv) {
374
374
if (!params.include_types .empty () && std::find (params.include_types .begin (), params.include_types .end (), i) == params.include_types .end ()) {
375
375
continue ;
376
376
}
377
- quantize_fns_t qfns = ggml_internal_get_quantize_fn (i );
378
- if (qfns.quantize_row_q && qfns.dequantize_row_q ) {
377
+ ggml_type_handling_t qfns = ggml_internal_get_type_handling (type );
378
+ if (qfns.from_float && qfns.to_float ) {
379
379
if (params.verbose ) {
380
380
printf (" testing %s ...\n " , ggml_type_name (type));
381
381
}
0 commit comments