We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e05e955 commit fe96358Copy full SHA for fe96358
xla/hlo/ir/hlo_instruction.cc
@@ -3918,9 +3918,10 @@ void HloInstruction::PrintWithCanonicalNameMap(
3918
}
3919
3920
if (options.print_metadata() &&
3921
- (!metadata_->op_type().empty() || !metadata_->op_name().empty() ||
3922
- !metadata_->source_file().empty() ||
3923
- !metadata_->scheduling_name().empty())) {
+ (metadata_ != nullptr &&
+ (!metadata_->op_type().empty() || !metadata_->op_name().empty() ||
+ !metadata_->source_file().empty() ||
3924
+ !metadata_->scheduling_name().empty()))) {
3925
printer->Append(", metadata={");
3926
printer->Append(xla::OpMetadataToString(
3927
*metadata_, options.print_metadata_only_op_name()));
0 commit comments