Skip to content

Commit a4d9044

Browse files
committed
tests : move assert to before printing sampled token
1 parent da70e8e commit a4d9044

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test-gpu-sampling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,14 +544,14 @@ static void test_gpu_dist_sampling(const char * model_path) {
544544

545545
{
546546
llama_token token = llama_get_sampled_token_ith(test_ctx.ctx, test_ctx.idx_for_seq(0));
547-
printf("sampled token = %d, string='%s'\n", token, test_ctx.token_to_piece(token, false).c_str());
548547
GGML_ASSERT(token != LLAMA_TOKEN_NULL);
548+
printf("sampled token = %d, string='%s'\n", token, test_ctx.token_to_piece(token, false).c_str());
549549
}
550550

551551
{
552552
llama_token token = llama_get_sampled_token_ith(test_ctx.ctx, -1);
553-
printf("sampled token = %d, string='%s'\n", token, test_ctx.token_to_piece(token, false).c_str());
554553
GGML_ASSERT(token != LLAMA_TOKEN_NULL);
554+
printf("sampled token = %d, string='%s'\n", token, test_ctx.token_to_piece(token, false).c_str());
555555
}
556556
}
557557

0 commit comments

Comments
 (0)