Skip to content

Commit

Permalink
Update random_normal_helper.cpp: reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
gkrivor authored Jun 21, 2024
1 parent d6a4765 commit d6fd767
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/frontends/common/src/random_normal_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ OutputVector make_random_normal(pass::NodeRegistry& registry,
// just interpret its value as a 32-bit value (float zero value is same with
// uint32 zero value).
// Float -0 value will be interpreted as a valid uint32 value.
const float seed_float = seed; // To prevent unexpected runtime errors due to storing seed in a register
const void* seed_ptr = &seed_float; // To prevent strict-aliasing error
const void* seed_ptr = &seed; // To prevent strict-aliasing error
const uint64_t op_seed = static_cast<const uint64_t>(*static_cast<const uint32_t*>(seed_ptr));

// We need to use two op_seeds to make sure we get different results for two RandomUniform series
Expand Down

0 comments on commit d6fd767

Please sign in to comment.