Script.randn¶
- Script.randn(seed, offset, n_rounds=10)¶
Generate a block of random float32 in N(0, 1) using Philox-4x32 PRNG.
Given a seed scalar and an offset register tensor, returns a register tensor of random float32 values following a standard normal distribution, using the Box-Muller transform.
- Parameters:
seed (Expr | int) – The seed for generating random numbers (uint64 scalar).
offset (RegisterTensor) – The offsets to generate random numbers for (uint32).
n_rounds (int) – Number of Philox rounds (default 10).
- Returns:
ret – A register tensor of random float32 values ~ N(0, 1) with the same shape as
offset.- Return type:
Notes
Thread group: Can be executed by any sized thread group.