aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction.cc
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2018-08-27 14:50:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-27 14:55:29 -0700
commitd57f5a82025702d573d478091dc9c385adf53c09 (patch)
treee0a9f6b00cd6846cf71a79e02779e1e1f1f9cfc5 /tensorflow/compiler/xla/service/hlo_instruction.cc
parent91f33732cb15f51eaf6ec86c82e42a74e351e061 (diff)
[XLA] Switch to absl::StrFormat.
Unlike Printf, StrFormat does not require type-length qualifiers, e.g %z, %ll. Nor does it require that you call c_str() to print strings. So these are fixed up here as well. PiperOrigin-RevId: 210435915
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction.cc b/tensorflow/compiler/xla/service/hlo_instruction.cc
index 3e077d8aec..6b4f3c4eb8 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction.cc
+++ b/tensorflow/compiler/xla/service/hlo_instruction.cc
@@ -2381,7 +2381,7 @@ Status HloInstruction::Visit(DfsHloVisitorBase<HloInstructionPtr>* visitor) {
return InternalError(
"Unhandled HloOpcode for DfsHloVisitor: %s. This should not happen - "
"please file a bug for XLA.",
- HloOpcodeString(opcode_).c_str());
+ HloOpcodeString(opcode_));
}
// Explicit instantiations.
@@ -2464,7 +2464,7 @@ static Status PostOrderDFS(HloInstruction* root, Visitor* visitor,
if (!TF_PREDICT_TRUE(PushDFSChild(visitor, &dfs_stack, child))) {
return FailedPrecondition(
"A cycle is detected while visiting instruction %s",
- current_node->ToString().c_str());
+ current_node->ToString());
}
}
@@ -2473,7 +2473,7 @@ static Status PostOrderDFS(HloInstruction* root, Visitor* visitor,
if (!TF_PREDICT_TRUE(PushDFSChild(visitor, &dfs_stack, child))) {
return FailedPrecondition(
"A cycle is detected while visiting instruction %s",
- current_node->ToString().c_str());
+ current_node->ToString());
}
}
}
@@ -2789,7 +2789,7 @@ StatusOr<HloInstruction::FusionKind> StringToFusionKind(
if (kind_name == "kCustom") {
return HloInstruction::FusionKind::kCustom;
}
- return InvalidArgument("Unknown fusion kind: %s", kind_name.c_str());
+ return InvalidArgument("Unknown fusion kind: %s", kind_name);
}
string PaddingConfigToString(const PaddingConfig& padding) {