Ensure different distributions (e.g. from tf.random.normal and tf.random.uniform) are not considered identical.

PiperOrigin-RevId: 314992733
Change-Id: Ib537e6c5311b07a6ed930f413bee9feefbd09e12
This commit is contained in:
Urs Koster 2020-06-05 14:05:37 -07:00 committed by TensorFlower Gardener
parent e255175f16
commit e96c412005

View File

@ -1818,7 +1818,8 @@ bool HloRngInstruction::IdenticalSlowPath(
const HloInstruction& other,
const std::function<bool(const HloComputation*, const HloComputation*)>&
eq_computations) const {
return true;
const auto& casted_other = static_cast<const HloRngInstruction&>(other);
return distribution_ == casted_other.distribution_;
}
std::unique_ptr<HloInstruction> HloRngInstruction::CloneWithNewOperandsImpl(