You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add deterministic RNG launch config for cross-device consistency
When FLAGS_deterministic_rng is enabled, RNG kernels use a fixed
grid_size and block_size instead of device-dependent values, ensuring
the same seed produces identical random sequences across GPU types.
Two new flags:
- FLAGS_deterministic_rng (bool, default=false): enable the feature
- FLAGS_deterministic_rng_grid (int32, default=1024): grid size cap
Modified files:
- flags.cc: define the two flags
- rng_launch_config.h: new helper (IsDeterministicRNG, GetDeterministicRNGConfig)
- distribution_helper.h: if/else branch in distribution_and_transform
- dropout_impl.cu.h: if/else branch in DropoutFwGPUKernelDriver
- fused_dropout_add_utils.h: if/else branch in GetRandomCudaProp
Default (flag off) behavior is unchanged.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments