Skip to content

Commit f530106

Browse files
committed
remove busy loop that was used as sleep for slower sinus wave generation
1 parent 4997bc5 commit f530106

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

examples/baby-llama/baby-llama.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,6 @@ int main(int argc, char ** argv) {
13021302
print_token(ggml_get_i32_1d(tokens_input, i), n_vocab);
13031303
}
13041304
printf("---\n");
1305-
int important_sum = 0;
13061305
for (int i=0; i<n_gen; ++i) {
13071306
struct ggml_init_params params = {
13081307
/*.mem_size =*/ compute_size,
@@ -1340,15 +1339,9 @@ int main(int argc, char ** argv) {
13401339
// print_token(ggml_get_i32_1d(tokens_input, i), model.hparams.n_vocab);
13411340
// }
13421341
// printf("--\n");
1343-
for (int k=0; k<1000000; ++k) {
1344-
for (int j=0; j<30; ++j) {
1345-
important_sum += (k+j) / MAX(1,i);
1346-
}
1347-
}
13481342

13491343
ggml_free(ctx0);
13501344
}
1351-
printf("important (dont optimize it away, compiler!) : %d\n", important_sum);
13521345
}
13531346

13541347
print_matrix(model.tok_embeddings);

0 commit comments

Comments
 (0)