Generates pseudo-random numbers using the specified algorithm and returns the updated RNG state together with the generated values.
Arguments
- initial_state
(
tensorish)
RNG state (ui64[2]).- rng_algorithm
(
character(1))
RNG algorithm name. Default is"THREE_FRY".- dtype
(
character(1)|stablehlo::TensorDataType)
Data type of the generated random values.- shape
(
integer())
Shape.
Value
list of two tensorish values:
The first element is the updated RNG state with the same dtype and shape
as initial_state. The second element is a tensor of random values with
the given dtype and shape.
StableHLO
Lowers to stablehlo::hlo_rng_bit_generator().