Fix fingerprint mismatch issue by excluding module's and entry computation's name when computing fingerprint.
PiperOrigin-RevId: 319911247 Change-Id: Id8ced870114fcbfd26e7ef1d4fd2589d85b5d06b
This commit is contained in:
parent
a69ce6b680
commit
6300825449
@ -549,7 +549,11 @@ string HloComputation::ToString(
|
||||
if (options.print_percent()) {
|
||||
s << "%";
|
||||
}
|
||||
s << PrintName(name(), options.print_ids()) << " ";
|
||||
if (options.print_ids() || !IsEntryComputation()) {
|
||||
// Exclude entry computation's name because it includes and leads to
|
||||
// non-deterministic fingerprint.
|
||||
s << PrintName(name(), options.print_ids()) << " ";
|
||||
}
|
||||
}
|
||||
|
||||
if (options.print_program_shape()) {
|
||||
|
@ -230,7 +230,10 @@ void HloModule::ReplaceComputations(
|
||||
|
||||
string HloModule::ToString(const HloPrintOptions& options) const {
|
||||
std::ostringstream s;
|
||||
s << "HloModule " << PrintName(name(), options.print_ids());
|
||||
// When print_ids() is false, exclude module's name because it includes and
|
||||
// leads to non-deterministic fingerprint.
|
||||
s << "HloModule "
|
||||
<< (options.print_ids() ? PrintName(name(), options.print_ids()) : "");
|
||||
if (has_schedule()) {
|
||||
TF_CHECK_OK(schedule().Verify());
|
||||
s << ", is_scheduled=true";
|
||||
|
Loading…
Reference in New Issue
Block a user