add srand() in speculative.cpp

This commit is contained in:
Minsoo Cheong 2024-02-28 02:26:01 +09:00
parent 875319b323
commit 6afc1f60e1

View file

@ -41,6 +41,12 @@ int main(int argc, char ** argv) {
// probability threshold for splitting a draft branch (only for n_seq_dft > 1)
const float p_split = params.p_split;
if (params.seed >= 0) {
srand(params.seed);
} else {
srand(time(NULL));
}
#ifndef LOG_DISABLE_LOGS
log_set_target(log_filename_generator("speculative", "log"));
LOG_TEE("Log start\n");