Class ov::reference::philox::PhiloxGenerator#
-
class PhiloxGenerator#
Generator of random numbers based on the Philox algorithm. Abstract base class for various specializations used to match outputs based on input seed(s) for supported frameworks.
Subclassed by ov::reference::philox::MockPhiloxGenerator, ov::reference::philox::PytorchPhiloxGenerator, ov::reference::philox::TensorflowPhiloxGenerator
Public Functions
-
virtual PhiloxOutput random() = 0#
Get a set of 4 random 32-bit unsigned integers based on the seed(s).
- Returns:
A vector with a random set of 4 32-bit unsigned integers.
-
virtual std::pair<uint64_t, uint64_t> get_next_state() = 0#
Returns the modified state to feed to the next execution.
- Returns:
A pair of uint64s that represent the output state to be fed to the next generator execution.
-
uint64_t get_global_seed() const#
Returns the global seed of the generator.
-
uint64_t get_operator_seed() const#
Returns the operator seed of the generator.
-
ov::op::PhiloxAlignment get_alignment() const#
Returns the alignment mode of the generator.
-
std::pair<uint64_t, uint64_t> get_previous_state() const#
Returns the input (previous execution) state of the generator.
-
void set_global_seed(const uint64_t global_seed)#
Setter for the global seed.
- Parameters:
global_seed – The new global seed for the Philox algorithm
-
void set_operator_seed(const uint64_t op_seed)#
Setter for the operator seed.
- Parameters:
op_seed – The new operator seed for the Philox algorithm
-
virtual PhiloxOutput random() = 0#