File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,19 @@ int main(void) {
217
217
int workload_arr_len = sizeof (workload_arr ) / sizeof (workload_arr [0 ]);
218
218
219
219
// skip slow/big n_threads.
220
+
221
+ int n_slow = 0 ;
222
+
220
223
for (int i = 0 ; i < threads_arr_len ; i ++ ) {
221
224
int n_threads = threads_arr [i ];
222
225
226
+ // At github, Windows can take more than 20 seconds to start 15 threads.
227
+ // Let's silently ignore when we saw two adjacent slowness.
228
+ if (n_slow >= 2 ) {
229
+ threads_arr [i ] = 0 ;
230
+ continue ;
231
+ }
232
+
223
233
if (n_threads == 1 ) {
224
234
continue ;
225
235
} else if (n_threads > MAX_N_THREADS ) {
@@ -243,10 +253,14 @@ int main(void) {
243
253
244
254
int elapsed_us = t1 - t0 ;
245
255
if (elapsed_us > 500 * n_threads ) {
246
- printf ("[test-ggml-threading] warning: it took took %.3f "
247
- "ms to start %d worker thread(s). Loo slow, skip.\n" ,
256
+ printf ("[test-ggml-threading] warning: it took took %7 .3f "
257
+ "ms to start %2d worker thread(s). Too slow, skip.\n" ,
248
258
1.0 * elapsed_us / 1000 , n_threads - 1 );
249
259
threads_arr [i ] = 0 ;
260
+ ++ n_slow ;
261
+ } else {
262
+ // clear.
263
+ n_slow = 0 ;
250
264
}
251
265
}
252
266
You can’t perform that action at this time.
0 commit comments