Skip to content

Commit 4eaf9de

Browse files
ggerganovarthw
authored andcommitted
tests : fix test-quantize-fns to init the CPU backend (ggml-org#12306)
ggml-ci
1 parent 09888a9 commit 4eaf9de

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tests/test-quantize-fns.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,7 @@ int main(int argc, char * argv[]) {
120120
generate_data(0.0, test_data.size(), test_data.data());
121121
generate_data(1.0, test_data2.size(), test_data2.data());
122122

123-
// Initialize GGML, ensures float conversion tables are initialized
124-
struct ggml_init_params ggml_params = {
125-
/* .mem_size = */ 1*1024,
126-
/* .mem_buffer = */ NULL,
127-
/* .no_alloc = */ true,
128-
};
129-
struct ggml_context * ctx = ggml_init(ggml_params);
123+
ggml_cpu_init();
130124

131125
int num_failed = 0;
132126
bool failed = false;
@@ -188,7 +182,5 @@ int main(int argc, char * argv[]) {
188182
printf("%d tests failed\n", num_failed);
189183
}
190184

191-
ggml_free(ctx);
192-
193185
return num_failed > 0;
194186
}

0 commit comments

Comments
 (0)