Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Fix the parity of the RNG #7239

Merged
merged 2 commits into from
Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions taichi/runtime/llvm/llvm_runtime_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,9 @@ void LlvmRuntimeExecutor::materialize_runtime(MemoryPool *memory_pool,
auto *const runtime_jit = tlctx->runtime_jit_module;

// Starting random state for the program calculated using the random seed.
// The seed is multiplied by 2^20 so that two programs with different seeds
// The seed is multiplied by 1048391 so that two programs with different seeds
// will not have overlapping random states in any thread.
int starting_rand_state = config_->random_seed * 1048576;
int starting_rand_state = config_->random_seed * 1048391;

// Number of random states. One per CPU/CUDA thread.
int num_rand_states = 0;
Expand Down